org.springframework.core

## 接口 Ordered

- 所有已知子接口:
    PriorityOrdered

      public interface Ordered

  `Ordered` is an interface that can be implemented by objects that should be orderable, for example in a `Collection`.

  The actual `order` can be interpreted as prioritization, with the first object (with the lowest order value) having the highest priority.

  Note that there is also a priority marker for this interface: `PriorityOrdered`. Order values expressed by `PriorityOrdered` objects always apply before same order values expressed by plain `Ordered` objects.

  Consult the Javadoc for `OrderComparator` for details on the sort semantics for non-ordered objects.

  从以下版本开始:
    07.04.2003
  作者:
    Juergen Hoeller, Sam Brannen
  另请参阅:
    `PriorityOrdered`, `OrderComparator`, `Order`, `AnnotationAwareOrderComparator`

- - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `static int` | `HIGHEST_PRECEDENCE` Useful constant for the highest precedence value.
    `static int` | `LOWEST_PRECEDENCE` Useful constant for the lowest precedence value.

  - ### 方法概要

    所有方法 实例方法 抽象方法
    限定符和类型 | 方法和说明
    --- | ---
    `int` | `getOrder()` Get the order value of this object.

- - ### 字段详细资料

    - #### HIGHEST_PRECEDENCE

          static final int HIGHEST_PRECEDENCE

      Useful constant for the highest precedence value.
      另请参阅:
        `Integer.MIN_VALUE`, 常量字段值

    - #### LOWEST_PRECEDENCE

          static final int LOWEST_PRECEDENCE

      Useful constant for the lowest precedence value.
      另请参阅:
        `Integer.MAX_VALUE`, 常量字段值

  - ### 方法详细资料

    - #### getOrder

          int getOrder()

      Get the order value of this object.

      Higher values are interpreted as lower priority. As a consequence, the object with the lowest value has the highest priority (somewhat analogous to Servlet `load-on-startup` values).

      Same order values will result in arbitrary sort positions for the affected objects.

      返回:
        the order value
      另请参阅:
        `HIGHEST_PRECEDENCE`, `LOWEST_PRECEDENCE`