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.sakaiproject.gradebookng.business.CourseGradeComparator.java

/**
 * Comparator class for sorting by course grade, first by the letter grade's index in the gradebook's grading scale and then by the number
 * of points the student has earned.
 */
public class CourseGradeComparator implements Comparator<GbStudentGradeInfo> {

From source file DirList2.java

class AlphabeticComparator implements Comparator {
    public int compare(Object o1, Object o2) {
        String s1 = (String) o1;
        String s2 = (String) o2;
        return s1.toLowerCase().compareTo(s2.toLowerCase());
    }

From source file org.nuxeo.ecm.platform.ui.web.component.SelectItemComparator.java

/**
 * Orders select items by id or label, handling localization.
 *
 * @author <a href="mailto:glefter@nuxeo.com">George Lefter</a>
 */
public class SelectItemComparator implements Comparator<SelectItem>, Serializable {

From source file edu.tum.cs.vis.model.util.HandleComparator.java

/**
 * Handle comparator used to sort list of handle annotations according their handle probability.
 * 
 * @author Stefan Profanter
 * 
 */

From source file org.kuali.coeus.common.framework.person.PersonRolodexComparator.java

/**
 * Used to order <code>{@link PersonRolodex}</code> instances by the role.
 */
public class PersonRolodexComparator implements Comparator<PersonRolodex> {
    private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory
            .getLog(PersonRolodexComparator.class);

From source file org.sleuthkit.autopsy.imagegallery.datamodel.grouping.GroupSortBy.java

/**
 * Pseudo enum of possible properties to sort groups by.
 */
@NbBundle.Messages({ "GroupSortBy.groupSize=Group Size", "GroupSortBy.groupName=Group Name",
        "GroupSortBy.none=None", "GroupSortBy.priority=Priority" })
public class GroupSortBy implements Comparator<DrawableGroup> {

From source file org.knowrob.vis.model.util.HandleComparator.java

/**
 * Handle comparator used to sort list of handle annotations according their handle probability.
 * 
 * @author Stefan Profanter
 * 
 */

From source file Company.java

class EmpComparator implements Comparator {

    public int compare(Object obj1, Object obj2) {
        Employee emp1 = (Employee) obj1;
        Employee emp2 = (Employee) obj2;

From source file de.atomfrede.tools.evalutation.util.EntryComparator.java

/**
 * Special comparator that compares two lines of a .csv file and compares them by date and time
 */
public class EntryComparator implements Comparator<String[]> {

    private final Log log = LogFactory.getLog(EntryComparator.class);

From source file org.apache.hadoop.yarn.server.resourcemanager.scheduler.policy.CompoundComparator.java

class CompoundComparator implements Comparator<SchedulableEntity> {

    List<Comparator<SchedulableEntity>> comparators;

    CompoundComparator(List<Comparator<SchedulableEntity>> comparators) {
        this.comparators = comparators;