Interface IComparable<DATATYPE>

Type Parameters:
DATATYPE - The data type to be compared
All Superinterfaces:
Comparable<DATATYPE>
All Known Subinterfaces:
IMutableInteger<IMPLTYPE>, IMutableNumeric<IMPLTYPE>, IMutableObject<IMPLTYPE>
All Known Implementing Classes:
AbstractMutableInteger, AbstractMutableNumeric, Codepoint, MimeType, MutableBigDecimal, MutableBigInteger, MutableBoolean, MutableByte, MutableChar, MutableDouble, MutableFloat, MutableInt, MutableLong, MutableShort, ObjectType, Version, VersionRange

public interface IComparable<DATATYPE> extends Comparable<DATATYPE>
A special interface extension to the Comparable interface that adds some default comparison methods.
Since:
8.6.3
Author:
Philip Helger
  • Method Details

    • isGT

      default boolean isGT(@Nonnull DATATYPE aOther)
      Parameters:
      aOther - value to compare to
      Returns:
      true if this value is greater than the provided values, false if not.
      Since:
      8.6.5
    • isGE

      default boolean isGE(@Nonnull DATATYPE aOther)
      Parameters:
      aOther - value to compare to
      Returns:
      true if this value is greater or equal than the provided values, false if not.
      Since:
      8.6.5
    • isLT

      default boolean isLT(@Nonnull DATATYPE aOther)
      Parameters:
      aOther - value to compare to
      Returns:
      true if this value is lower than the provided values, false if not.
      Since:
      8.6.5
    • isLE

      default boolean isLE(@Nonnull DATATYPE aOther)
      Parameters:
      aOther - value to compare to
      Returns:
      true if this value is lower or equal than the provided values, false if not.
      Since:
      8.6.5
    • isEQ

      default boolean isEQ(@Nonnull DATATYPE aOther)
      Parameters:
      aOther - value to compare to
      Returns:
      true if the values are equal, false otherwise.
      Since:
      8.6.5
    • isNE

      default boolean isNE(@Nonnull DATATYPE aOther)
      Parameters:
      aOther - value to compare to
      Returns:
      true if the values are not equal, false otherwise.
      Since:
      8.6.5