Class StaffComparator

java.lang.Object
org.deltava.comparators.AbstractComparator<Staff>
org.deltava.comparators.StaffComparator
All Implemented Interfaces:
Serializable, Comparator<Staff>

public class StaffComparator extends AbstractComparator<Staff>
A Comparator for Staff Profiles.
Since:
1.0
Version:
8.0
Author:
Luke
See Also:
  • Field Details

  • Constructor Details

    • StaffComparator

      public StaffComparator(int comparisonType)
      Initializes the comparator.
      Parameters:
      comparisonType - the comparison type code
      Throws:
      IllegalArgumentException - if an invalide code is specified
  • Method Details

    • hasAreas

      public boolean hasAreas()
      Returns whether functional areas have been loaded.
      Returns:
      TRUE if areas are present, otherwise FALSE
    • setAreas

      public void setAreas(Collection<String> areas)
      Initializes the functional areas.
      Parameters:
      areas - an ordered Collection of area names
      See Also:
    • compareImpl

      protected int compareImpl(Staff o1, Staff o2)
      Compares two Staff Profiles by the designated criteria.
      Specified by:
      compareImpl in class AbstractComparator<Staff>
      Parameters:
      o1 - The first object to compare
      o2 - The second object to compare
      Returns:
      -1, 0, 1 as defined by the compareTo(Object, Object) interface
      Throws:
      ClassCastException - if either object is not a Staff
      See Also: