org.apache.myfaces.trinidad.model

## Class SortCriterion

- java.lang.Object
- - org.apache.myfaces.trinidad.model.SortCriterion

- All Implemented Interfaces:
    Serializable

      public class SortCriterion
      extends Object
      implements Serializable

  This class pairs together a property and a direction by which a CollectionModel can be sorted.
  See Also:
    `CollectionModel.getSortCriteria()`, Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SortCriterion(String property, boolean isAscending)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `String` | `getProperty()` Gets the property that is identified by this class.
    `int` | `hashCode()`
    `boolean` | `isAscending()` Gets the direction in which the property of this class is sorted.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SortCriterion

          public SortCriterion(String property,
                       boolean isAscending)

  - ### Method Detail

    - #### isAscending

          public boolean isAscending()

      Gets the direction in which the property of this class is sorted.
      Returns:
        true if the property identified by this class is sorted in ascending order.

    - #### getProperty

          public String getProperty()

      Gets the property that is identified by this class. This is the property that must be sorted by. If a collection of beans is being sorted, bean rules will be used to find a suitable getter method that matches this property. The value returned by the getter method will be sorted on. If a collection of Maps is being sorted, this property will be used as the key into each Map to get at the value being sorted.

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2001-2016 The Apache Software Foundation. All Rights Reserved.