Interface RichComparable<T>

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

    public interface RichComparable<T>
    extends Comparable<T>
    Extends useful methods for comparison to Comparable interface.
    • 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