Interface Ordered<T>

Type Parameters:
T - the ordered type
All Superinterfaces:
Comparable<T>
All Known Subinterfaces:
Int, Rational
All Known Implementing Classes:
Angle, IntAccumulator

public interface Ordered<T> extends Comparable<T>
Defines the contract for Ordered.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    isEqualTo(T other)
    Checks whether is Equal To.
    default boolean
    Checks whether is Greater Than.
    default boolean
    Checks whether is Greater Than Or Equal To.
    default boolean
    isLessThan(T other)
    Checks whether is Less Than.
    default boolean
    Checks whether is Less Than Or Equal To.
    static <S extends Ordered<S>>
    S
    max(S a, S b)
    Performs max.
    static <S extends Ordered<S>>
    S
    max(S a, S b, S... others)
    Performs max.
    static <S extends Ordered<S>>
    S
    min(S a, S b)
    Performs min.
    static <S extends Ordered<S>>
    S
    min(S a, S b, S... others)
    Performs min.

    Methods inherited from interface java.lang.Comparable

    compareTo
  • Method Details

    • min

      static <S extends Ordered<S>> S min(S a, S b)
      Performs min.
      Parameters:
      a - the a value
      b - the b value
      Returns:
      the result of min
    • min

      static <S extends Ordered<S>> S min(S a, S b, S... others)
      Performs min.
      Parameters:
      a - the a value
      b - the b value
      others - the others value
      Returns:
      the result of min
    • max

      static <S extends Ordered<S>> S max(S a, S b)
      Performs max.
      Parameters:
      a - the a value
      b - the b value
      Returns:
      the result of max
    • max

      static <S extends Ordered<S>> S max(S a, S b, S... others)
      Performs max.
      Parameters:
      a - the a value
      b - the b value
      others - the others value
      Returns:
      the result of max
    • isLessThan

      default boolean isLessThan(T other)
      Checks whether is Less Than.
      Parameters:
      other - the other value
      Returns:
      the result of isLessThan
    • isLessThanOrEqualTo

      default boolean isLessThanOrEqualTo(T other)
      Checks whether is Less Than Or Equal To.
      Parameters:
      other - the other value
      Returns:
      the result of isLessThanOrEqualTo
    • isGreaterThan

      default boolean isGreaterThan(T other)
      Checks whether is Greater Than.
      Parameters:
      other - the other value
      Returns:
      the result of isGreaterThan
    • isGreaterThanOrEqualTo

      default boolean isGreaterThanOrEqualTo(T other)
      Checks whether is Greater Than Or Equal To.
      Parameters:
      other - the other value
      Returns:
      the result of isGreaterThanOrEqualTo
    • isEqualTo

      default boolean isEqualTo(T other)
      Checks whether is Equal To.
      Parameters:
      other - the other value
      Returns:
      the result of isEqualTo