Class SystemPropertiesTableModel.SystemPropertyComparator

java.lang.Object
org.jfree.ui.about.SystemPropertiesTableModel.SystemPropertyComparator
All Implemented Interfaces:
Comparator
Enclosing class:
SystemPropertiesTableModel

protected static class SystemPropertiesTableModel.SystemPropertyComparator extends Object implements Comparator
A class for comparing SystemProperty objects.
  • Field Details

    • ascending

      private boolean ascending
      Indicates the sort order.
  • Constructor Details

    • SystemPropertyComparator

      public SystemPropertyComparator(boolean ascending)
      Standard constructor.
      Parameters:
      ascending - a flag that controls the sort order (ascending or descending).
  • Method Details

    • compare

      public int compare(Object o1, Object o2)
      Compares two objects.
      Specified by:
      compare in interface Comparator
      Parameters:
      o1 - the first object.
      o2 - the second object.
      Returns:
      an integer that indicates the relative order of the objects.
    • equals

      public boolean equals(Object o)
      Returns true if this object is equal to the specified object, and false otherwise.
      Specified by:
      equals in interface Comparator
      Overrides:
      equals in class Object
      Parameters:
      o - the other object.
      Returns:
      A boolean.
    • hashCode

      public int hashCode()
      Returns a hash code value for the object.
      Overrides:
      hashCode in class Object
      Returns:
      the hashcode