Class ListSorter


  • public class ListSorter
    extends java.lang.Object
    A data-object that holds data related to list sorting - property and direction
    • Constructor Summary

      Constructors 
      Constructor Description
      ListSorter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ListSorter ascending()
      Signals that the sorting should be done in acending mode
      ListSorter descending()
      Signals that sorting should be done in descending mode
      java.lang.String getProperty()
      Returns the name of the property used for sorting
      boolean isAscending()
      Returns the type of sorting that is used
      ListSorter property​(java.lang.String p)
      Sets the property for this sorter
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ListSorter

        public ListSorter()
    • Method Detail

      • property

        public ListSorter property​(java.lang.String p)
        Sets the property for this sorter
        Parameters:
        p - a String object representing the name of the property
        Returns:
        an instance of this object
      • ascending

        public ListSorter ascending()
        Signals that the sorting should be done in acending mode
        Returns:
        an instance of this object
      • descending

        public ListSorter descending()
        Signals that sorting should be done in descending mode
        Returns:
        an instance of this object
      • isAscending

        public boolean isAscending()
        Returns the type of sorting that is used
        Returns:
        true if this sorter uses ascending sorting, false otherwise
      • getProperty

        public java.lang.String getProperty()
        Returns the name of the property used for sorting
        Returns:
        a String representing the name of the property used for sorting.