Interface AdvancedServerComparator<O>


public interface AdvancedServerComparator<O>
A comparison function, which imposes a total ordering on some collection of objects.



Supported API: true

Extendable: true

  • Method Summary

    Modifier and Type
    Method
    Description
    int
    compare(O value1, O value2, ObjectSorter<O> object_sorter, String attribute_name)
    Compares its two arguments for order.
  • Method Details

    • compare

      int compare(O value1, O value2, ObjectSorter<O> object_sorter, String attribute_name)
      Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

      Supported API: true
      Parameters:
      value1 - the first object to be compared.
      value2 - the second object to be compared.
      attribute_name - the name of the attribute to be compared so that subclass can provide alternate comparisons based on said name.
      Returns:
      a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.