List of usage examples for java.util Comparator interface-usage
From source file org.opentestsystem.delivery.testreg.upload.validator.fileformat.DataRecordComparator.java
public class DataRecordComparator implements Comparator<DataRecord> { private static final String COLUMN_COMPARE_SALT = ","; @Override public int compare(DataRecord lhs, DataRecord rhs) {
From source file org.antbear.jee.spring.CaseInsensitiveComparator.java
/**
* Simple case insensitive string comparator.
*
* @author Marcus Geiger
*/
@Service
From source file org.ebayopensource.turmeric.eclipse.core.compare.LibraryTypeComparator.java
/** * The Class LibraryTypeComparator. * * @author smathew */ public class LibraryTypeComparator implements Comparator<LibraryType>, Serializable {
From source file com.draagon.meta.manager.ObjectComparator.java
public class ObjectComparator implements Comparator<Object> { private static Log log = LogFactory.getLog(ObjectComparator.class); private SortOrder mSort = null; public ObjectComparator(SortOrder sort) {
From source file com.edmunds.etm.rules.api.AlphabeticUrlRuleComparator.java
/** * Comparator that alphabetically sorts UrlRule objects. */ public class AlphabeticUrlRuleComparator implements Comparator<UrlRule> { public static final AlphabeticUrlRuleComparator INSTANCE = new AlphabeticUrlRuleComparator();
From source file Person.java
class ComparePersons implements Comparator<Person> { public int compare(Person person1, Person person2) { int result = -person1.getSurname().compareTo(person2.getSurname()); return result == 0 ? -person1.getFirstName().compareTo(person2.getFirstName()) : result; }
From source file org.jboss.tools.openshift.internal.core.util.ResourceKindAndNameComparator.java
public class ResourceKindAndNameComparator implements Comparator<IResource> { @Override public int compare(IResource first, IResource second) { int result = compareKind(first, second); if (result != 0) { return result;
From source file Person.java
class ComparePersons implements Comparator<Person> { // Method to compare Person objects - order is descending public int compare(Person person1, Person person2) { int result = -person1.getSurname().compareTo(person2.getSurname()); return result == 0 ? -person1.getFirstName().compareTo(person2.getFirstName()) : result; }
From source file guru.nidi.raml.doc.OptionComparator.java
/** * */ class OptionComparator implements Comparator<Option> { private final String options;
From source file load.solver.ProcessDifficultyComparator.java
public class ProcessDifficultyComparator implements Comparator<load.Beans.Process>, Serializable { @Override public int compare(load.Beans.Process o1, load.Beans.Process o2) { return new CompareToBuilder().append(o1.getRequiredCpu(), o2.getRequiredCpu()).toComparison(); }