org.springframework.beans.support

## 类 MutableSortDefinition

- java.lang.Object
- - org.springframework.beans.support.MutableSortDefinition

- 所有已实现的接口:
    Serializable, SortDefinition

      public class MutableSortDefinition
      extends Object
      implements SortDefinition, Serializable

  Mutable implementation of the `SortDefinition` interface. Supports toggling the ascending value on setting the same property again.
  从以下版本开始:
    26.05.2003
  作者:
    Juergen Hoeller, Jean-Pierre Pawlak
  另请参阅:
    `setToggleAscendingOnProperty(boolean)`, 序列化表格

- - ### 属性概要

    所有方法 实例方法 具体方法
    类型 | 属性和说明
    --- | ---
    `boolean` | `isToggleAscendingOn` 获取属性toggleAscendingOnProperty的值。

  - ### 构造器概要

    构造器
    构造器和说明
    `MutableSortDefinition()` Create an empty MutableSortDefinition, to be populated via its bean properties.
    `MutableSortDefinition(boolean toggleAscendingOnSameProperty)` Create a new MutableSortDefinition.
    `MutableSortDefinition(SortDefinition source)` Copy constructor: create a new MutableSortDefinition that mirrors the given sort definition.
    `MutableSortDefinition(String property, boolean ignoreCase, boolean ascending)` Create a MutableSortDefinition for the given settings.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `boolean` | `equals(Object other)`
    `String` | `getProperty()` Return the name of the bean property to compare.
    `int` | `hashCode()`
    `boolean` | `isAscending()` Return whether to sort ascending (true) or descending (false).
    `boolean` | `isIgnoreCase()` Return whether upper and lower case in String values should be ignored.
    `boolean` | `isToggleAscendingOnProperty()` 获取属性toggleAscendingOnProperty的值。
    `void` | `setAscending(boolean ascending)` Set whether to sort ascending (true) or descending (false).
    `void` | `setIgnoreCase(boolean ignoreCase)` Set whether upper and lower case in String values should be ignored.
    `void` | `setProperty(String property)` Set the property to compare.
    `void` | `setToggleAscendingOnProperty(boolean toggleAscendingOnProperty)` Set whether to toggle the ascending flag if the same property gets set again (that is, `setProperty(java.lang.String)` gets called with already set property name again).

    - ### 从类继承的方法 java.lang.Object

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

- - ### 属性详细信息

    - #### isToggleAscendingOn

          public boolean isToggleAscendingOnProperty

      获取属性toggleAscendingOnProperty的值。

  - ### 构造器详细资料

    - #### MutableSortDefinition

          public MutableSortDefinition()

      Create an empty MutableSortDefinition, to be populated via its bean properties.
      另请参阅:
        `setProperty(java.lang.String)`, `setIgnoreCase(boolean)`, `setAscending(boolean)`

    - #### MutableSortDefinition

          public MutableSortDefinition(SortDefinition source)

      Copy constructor: create a new MutableSortDefinition that mirrors the given sort definition.
      参数:
        `source` - the original sort definition

    - #### MutableSortDefinition

          public MutableSortDefinition(String property,
                                       boolean ignoreCase,
                                       boolean ascending)

      Create a MutableSortDefinition for the given settings.
      参数:
        `property` - the property to compare
        `ignoreCase` - whether upper and lower case in String values should be ignored
        `ascending` - whether to sort ascending (true) or descending (false)

    - #### MutableSortDefinition

          public MutableSortDefinition(boolean toggleAscendingOnSameProperty)

      Create a new MutableSortDefinition.
      参数:
        `toggleAscendingOnSameProperty` - whether to toggle the ascending flag if the same property gets set again (that is, `setProperty` gets called with already set property name again).

  - ### 方法详细资料

    - #### setProperty

          public void setProperty(String property)

      Set the property to compare.

      If the property was the same as the current, the sort is reversed if "toggleAscendingOnProperty" is activated, else simply ignored.

      另请参阅:
        `setToggleAscendingOnProperty(boolean)`

    - #### getProperty

          public String getProperty()

      从接口复制的说明: `SortDefinition`
      Return the name of the bean property to compare. Can also be a nested bean property path.
      指定者:
        `getProperty` 在接口中 `SortDefinition`

    - #### setIgnoreCase

          public void setIgnoreCase(boolean ignoreCase)

      Set whether upper and lower case in String values should be ignored.

    - #### isIgnoreCase

          public boolean isIgnoreCase()

      从接口复制的说明: `SortDefinition`
      Return whether upper and lower case in String values should be ignored.
      指定者:
        `isIgnoreCase` 在接口中 `SortDefinition`

    - #### setAscending

          public void setAscending(boolean ascending)

      Set whether to sort ascending (true) or descending (false).

    - #### isAscending

          public boolean isAscending()

      从接口复制的说明: `SortDefinition`
      Return whether to sort ascending (true) or descending (false).
      指定者:
        `isAscending` 在接口中 `SortDefinition`

    - #### setToggleAscendingOnProperty

          public void setToggleAscendingOnProperty(boolean toggleAscendingOnProperty)

      Set whether to toggle the ascending flag if the same property gets set again (that is, `setProperty(java.lang.String)` gets called with already set property name again).

      This is particularly useful for parameter binding through a web request, where clicking on the field header again might be supposed to trigger a resort for the same field but opposite order.

    - #### isToggleAscendingOnProperty

          public boolean isToggleAscendingOnProperty()

      获取属性toggleAscendingOnProperty的值。

    - #### equals

          public boolean equals(Object other)

      覆盖:
        `equals` 在类中 `Object`

    - #### hashCode

          public int hashCode()

      覆盖:
        `hashCode` 在类中 `Object`