Package com.helger.commons.compare
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 theComparableinterface that adds some default comparison methods.- Since:
- 8.6.3
- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default booleanisEQ(DATATYPE aOther)default booleanisGE(DATATYPE aOther)default booleanisGT(DATATYPE aOther)default booleanisLE(DATATYPE aOther)default booleanisLT(DATATYPE aOther)default booleanisNE(DATATYPE aOther)-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Method Detail
-
isGT
default boolean isGT(@Nonnull DATATYPE aOther)
- Parameters:
aOther- value to compare to- Returns:
trueif this value is greater than the provided values,falseif not.- Since:
- 8.6.5
-
isGE
default boolean isGE(@Nonnull DATATYPE aOther)
- Parameters:
aOther- value to compare to- Returns:
trueif this value is greater or equal than the provided values,falseif not.- Since:
- 8.6.5
-
isLT
default boolean isLT(@Nonnull DATATYPE aOther)
- Parameters:
aOther- value to compare to- Returns:
trueif this value is lower than the provided values,falseif not.- Since:
- 8.6.5
-
isLE
default boolean isLE(@Nonnull DATATYPE aOther)
- Parameters:
aOther- value to compare to- Returns:
trueif this value is lower or equal than the provided values,falseif not.- Since:
- 8.6.5
-
isEQ
default boolean isEQ(@Nonnull DATATYPE aOther)
- Parameters:
aOther- value to compare to- Returns:
trueif the values are equal,falseotherwise.- Since:
- 8.6.5
-
-