Example usage for java.util Comparator interface-usage

List of usage examples for java.util Comparator interface-usage

Introduction

In this page you can find the example usage for java.util Comparator interface-usage.

Usage

From source file org.jboss.qa.brms.performance.examples.common.domain.PersistableIdComparator.java

public class PersistableIdComparator implements Comparator<AbstractPersistable>, Serializable {

    @Override
    public int compare(AbstractPersistable a, AbstractPersistable b) {
        return new CompareToBuilder().append(a.getId(), b.getId()).toComparison();
    }

From source file com.codecrate.shard.util.ComparableComparator.java

public class ComparableComparator implements Comparator {
    private static final Log LOG = LogFactory.getLog(ComparableComparator.class);

    public int compare(Object object1, Object object2) {
        if (!(object1 instanceof Comparable)) {
            LOG.warn("Object is not comparable: " + object1.getClass());

From source file org.drools.planner.benchmark.TotalScoreSolverBenchmarkComparator.java

/**
 * @author Geoffrey De Smet
 */
public class TotalScoreSolverBenchmarkComparator implements Comparator<SolverBenchmark> {

    private WorstScoreSolverBenchmarkComparator worstScoreSolverBenchmarkComparator = new WorstScoreSolverBenchmarkComparator();

From source file org.b3log.solo.util.comparator.TagRefCntComparator.java

/**
 * Tag comparator by reference count.
 *
 * @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
 * @version 1.0.0.1, Dec 30, 2010
 */

From source file BooleanComparator.java

/**
 * A Comparator for Boolean objects that can sort either true or false first.
 *
 * @author Keith Donald
 * @since 1.2.2
 */

From source file cz.fi.muni.pa165.comparator.SortByPoints.java

/**
 *
 * @author Martin
 */
public class SortByPoints implements Comparator<Team> {

From source file org.optaplanner.osgi.common.business.ProblemFileComparator.java

public class ProblemFileComparator implements Comparator<File> {

    private static final AlphaNumericStringComparator ALPHA_NUMERIC_STRING_COMPARATOR = new AlphaNumericStringComparator();

    public int compare(File a, File b) {
        String aLowerCaseName = a.getName().toLowerCase(Locale.US);

From source file com.mitre.core.search.solrfacetsearch.provider.entity.VariantValueCategoryModelPriorityComparator.java

/**
 * Comparator for type {@link VariantValueCategoryModel}.
 * @Deprecated see {@link de.hybris.platform.b2bacceleratorfacades.search.solrfacetsearch.provider.entity.VariantValueCategoryModelPriorityComparator}
 */
@Deprecated
public class VariantValueCategoryModelPriorityComparator implements Comparator<VariantValueCategoryModel> {

From source file com.jnj.b2b.core.search.solrfacetsearch.provider.entity.VariantValueCategoryModelPriorityComparator.java

/**
 * Comparator for type {@link VariantValueCategoryModel}.
 * @Deprecated see {@link de.hybris.platform.b2bacceleratorfacades.search.solrfacetsearch.provider.entity.VariantValueCategoryModelPriorityComparator}
 */
@Deprecated
public class VariantValueCategoryModelPriorityComparator implements Comparator<VariantValueCategoryModel> {

From source file siia.channels.CustomerPriorityComparator.java

/**
 * @author Marius Bogoevici
 */
@Component
public class CustomerPriorityComparator implements Comparator<Message<Booking>> {