Interface Ordered<T>

  • Type Parameters:
    T - the type of the values to compare
    All Superinterfaces:
    Comparable<T>
    All Known Implementing Classes:
    Person

    public interface Ordered<T>
    extends Comparable<T>
    Interface extending Comparable with relational operator methods.
    Author:
    Herbert Praehofer
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default boolean greater​(T o)
      Tests if this object is greater than the given argument value.
      default boolean greaterEqual​(T o)
      Tests if this object is greater than or equal to the given argument value.
      default boolean less​(T o)
      Tests if this object is less than the given argument value.
      default boolean lessEqual​(T o)
      Tests if this object is less than or equal to the given argument value.
    • Method Detail

      • less

        default boolean less​(T o)
        Tests if this object is less than the given argument value.
        Parameters:
        o - the object to compare with
        Returns:
        true if this is less than the other object
      • greater

        default boolean greater​(T o)
        Tests if this object is greater than the given argument value.
        Parameters:
        o - the object to compare with
        Returns:
        true if this is greater than the other object
      • lessEqual

        default boolean lessEqual​(T o)
        Tests if this object is less than or equal to the given argument value.
        Parameters:
        o - the object to compare with
        Returns:
        true if this is less than or equal to the other object
      • greaterEqual

        default boolean greaterEqual​(T o)
        Tests if this object is greater than or equal to the given argument value.
        Parameters:
        o - the object to compare with
        Returns:
        true if this is greater than or equal to the other object