Interface Ordered<T>

Type Parameters:
T - the type
All Superinterfaces:
Comparable<T>
All Known Implementing Classes:
IdentifiedKey.Revision, ProtocolVersion

@NullMarked public interface Ordered<T> extends Comparable<T>
Something that is ordered.
Since:
3.3.0
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    greaterThan(T that)
    Checks if this is greater than that.
    default boolean
    lessThan(T that)
    Checks if this is less than that.
    default boolean
    Checks if this is equal to that.
    default boolean
    Checks if this is less than or equal to that.
    default boolean
    noLessThan(T that)
    Checks if this is greater than or equal to that.

    Methods inherited from interface java.lang.Comparable

    compareTo
  • Method Details

    • greaterThan

      default boolean greaterThan(T that)
      Checks if this is greater than that.
      Parameters:
      that - the other object
      Returns:
      true if this is greater than that, false otherwise
      Since:
      3.3.0
    • noLessThan

      default boolean noLessThan(T that)
      Checks if this is greater than or equal to that.
      Parameters:
      that - the other object
      Returns:
      true if this is greater than or equal to that, false otherwise
      Since:
      3.3.0
    • lessThan

      default boolean lessThan(T that)
      Checks if this is less than that.
      Parameters:
      that - the other object
      Returns:
      true if this is less than that, false otherwise
      Since:
      3.3.0
    • noGreaterThan

      default boolean noGreaterThan(T that)
      Checks if this is less than or equal to that.
      Parameters:
      that - the other object
      Returns:
      true if this is less than or equal to that, false otherwise
      Since:
      3.3.0
    • noGreaterOrLessThan

      default boolean noGreaterOrLessThan(T that)
      Checks if this is equal to that.
      Parameters:
      that - the other object
      Returns:
      true if this is equal to that, false otherwise
      Since:
      3.3.0