Interface RichComparable<T>

  • Type Parameters:
    T - type of instance to be compared
    All Superinterfaces:
    java.lang.Comparable<T>
    All Known Subinterfaces:
    Bandwidth
    All Known Implementing Classes:
    Frequency

    public interface RichComparable<T>
    extends java.lang.Comparable<T>
    Extends useful methods for comparison to Comparable interface.
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default boolean isGreaterThan​(T other)
      Compares if this object is greater than the specified object.
      default boolean isLessThan​(T other)
      Compares if this object is less than the specified object.
      • Methods inherited from interface java.lang.Comparable

        compareTo
    • Method Detail

      • isLessThan

        default boolean isLessThan​(T other)
        Compares if this object is less than the specified object.
        Parameters:
        other - the object to be compared
        Returns:
        true if this object is less than the specified object
      • isGreaterThan

        default boolean isGreaterThan​(T other)
        Compares if this object is greater than the specified object.
        Parameters:
        other - the object to be compared
        Returns:
        true if this object is less thant the specified object