List of usage examples for java.util Comparator interface-usage
From source file org.optaplanner.examples.cloudbalancing.optional.domain.CloudComputerStrengthComparator.java
public class CloudComputerStrengthComparator implements Comparator<CloudComputer>, Serializable { @Override public int compare(CloudComputer a, CloudComputer b) { return new CompareToBuilder().append(a.getMultiplicand(), b.getMultiplicand()) .append(b.getCost(), a.getCost()) // Descending (but this is debatable)
From source file com.tkmtwo.sarapi.support.FieldIdComparator.java
/** * */ public class FieldIdComparator implements Serializable, Comparator<Field> { private static final long serialVersionUID = 1L;
From source file com.tkmtwo.sarapi.support.FieldNameComparator.java
/** * */ public class FieldNameComparator implements Serializable, Comparator<Field> { private static final long serialVersionUID = 1L;
From source file org.drools.planner.examples.pas.domain.solver.BedStrengthComparator.java
public class BedStrengthComparator implements Comparator<Bed>, Serializable { public int compare(Bed a, Bed b) { Room aRoom = a.getRoom(); Room bRoom = b.getRoom(); return new CompareToBuilder().append(bRoom.getCapacity(), aRoom.getCapacity()) // Descending (smaller rooms are stronger)
From source file com.feilong.core.util.comparator.RegexGroupNumberComparator.java
/**
* ? number group .
*
* <h3>:</h3>
*
* <blockquote>
From source file org.kuali.test.comparators.SqlHierarchyComparator.java
/** * * @author rbtucker */ public class SqlHierarchyComparator implements Comparator<TableData> { @Override
From source file Main.java
class MyNameComp implements Comparator<Empl> { @Override public int compare(Empl e1, Empl e2) { return e1.getName().compareTo(e2.getName()); }
From source file org.optaplanner.benchmark.impl.ranking.SubSingleBenchmarkRankingComparator.java
public class SubSingleBenchmarkRankingComparator implements Comparator<SubSingleBenchmarkResult>, Serializable { private final Comparator<Score> resilientScoreComparator = new ResilientScoreComparator(); @Override public int compare(SubSingleBenchmarkResult a, SubSingleBenchmarkResult b) {
From source file org.jboss.dashboard.ui.formatters.ForComparator.java
public class ForComparator implements Comparator { private static transient org.slf4j.Logger log = org.slf4j.LoggerFactory .getLogger(ForComparator.class.getName()); private List sortTokens = new ArrayList(); public ForComparator(String sortProperties) {
From source file org.jdal.util.comparator.AlphaNumericComparator.java
/**
* An alhpa numeric comparator. ie 10 is after 9.
*
* @author Jose Luis Martin.
* @since 1.0
*/