List of usage examples for java.util Comparator interface-usage
From source file org.onebusaway.admin.comparator.ObservedDSCComparator.java
/** * Compares vehicles by their observed DSC nulls last * @author abelsare * */ public class ObservedDSCComparator implements Comparator<VehicleStatus> {
From source file org.onebusaway.admin.comparator.VehicleIdComparator.java
/** * Compares vehicle records by vehicle ids nulls last * @author abelsare * */ public class VehicleIdComparator implements Comparator<VehicleStatus> {
From source file org.drools.planner.examples.tsp.domain.solver.LatitudeVisitDifficultyComparator.java
public class LatitudeVisitDifficultyComparator implements Comparator<Visit>, Serializable { public int compare(Visit a, Visit b) { return new CompareToBuilder() // TODO experiment with (aLatitude - bLatitude) % 10 .append(a.getCity().getLatitude(), b.getCity().getLatitude())
From source file org.drools.planner.examples.tsp.domain.solver.LongitudeVisitDifficultyComparator.java
public class LongitudeVisitDifficultyComparator implements Comparator<Visit>, Serializable { public int compare(Visit a, Visit b) { return new CompareToBuilder() // TODO experiment with (aLongitude - bLongitude) % 10 .append(a.getCity().getLongitude(), b.getCity().getLongitude())
From source file com.cladonia.xngreditor.ErrorList.java
/**
* This ErrorList is used to keep a list of all the XML errors for a document.
*
* @version $Revision: 1.1 $, $Date: 2004/07/22 15:58:55 $
* @author Dogsbay
*/
From source file org.diffkit.common.DKElementComparator.java
/** * @author jpanico */ public class DKElementComparator<T> implements Comparator<T[]> { private final int _lhsIdx; private final int _rhsIdx;
From source file com.thoughtworks.go.util.comparator.AlphaAsciiCollectionComparator.java
public class AlphaAsciiCollectionComparator<T> implements Comparator<Collection<? extends Comparable<T>>> { private AlphaAsciiComparator comparator; public AlphaAsciiCollectionComparator() { comparator = new AlphaAsciiComparator(); }
From source file org.optaplanner.benchmark.impl.ranking.SingleBenchmarkRankingComparator.java
public class SingleBenchmarkRankingComparator implements Comparator<SingleBenchmarkResult>, Serializable { public int compare(SingleBenchmarkResult a, SingleBenchmarkResult b) { return new CompareToBuilder().append(a.isFailure(), b.isFailure()).append(a.getScore(), b.getScore()) .toComparison(); }
From source file ontopoly.utils.TopicIdComparator.java
public class TopicIdComparator implements Comparator<Topic>, Serializable { public static final TopicIdComparator INSTANCE = new TopicIdComparator(); private TopicIdComparator() { // don't call me
From source file org.drools.planner.examples.cloudbalancing.domain.solver.CloudAssignmentDifficultyComparator.java
public class CloudAssignmentDifficultyComparator implements Comparator<Object> { public int compare(Object a, Object b) { return compare((CloudAssignment) a, (CloudAssignment) b); }