Class EntryListIntegerComparator

java.lang.Object
com.isode.dsapi.util.EntryListIntegerComparator
All Implemented Interfaces:
Comparator<Entry>
Direct Known Subclasses:
EntryListIntegerAttributeComparator

public abstract class EntryListIntegerComparator extends Object implements Comparator<Entry>
Integer comparator for use with EntryList class
Author:
mst
  • Field Details

    • ascending

      protected boolean ascending
  • Constructor Details

    • EntryListIntegerComparator

      public EntryListIntegerComparator(boolean ascending)
      Constructor
      Parameters:
      ascending - ascending order
  • Method Details

    • getValueInteger

      protected abstract Integer getValueInteger(Entry entry)
      Return Integer value generated from source entry
      Parameters:
      entry - source entry
    • compare

      public int compare(Entry e1, Entry e2)
      compare method used by sorting algorithm
      Specified by:
      compare in interface Comparator<Entry>
      Parameters:
      e1 - first entry to compare
      e2 - second entry to compare