Package org.midheaven.lang
Interface Ordered<T>
- Type Parameters:
T- the ordered type
- All Superinterfaces:
Comparable<T>
- All Known Implementing Classes:
Angle,IntAccumulator
Defines the contract for Ordered.
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanChecks whether is Equal To.default booleanisGreaterThan(T other) Checks whether is Greater Than.default booleanisGreaterThanOrEqualTo(T other) Checks whether is Greater Than Or Equal To.default booleanisLessThan(T other) Checks whether is Less Than.default booleanisLessThanOrEqualTo(T other) Checks whether is Less Than Or Equal To.static <S extends Ordered<S>>
Smax(S a, S b) Performs max.static <S extends Ordered<S>>
Smax(S a, S b, S... others) Performs max.static <S extends Ordered<S>>
Smin(S a, S b) Performs min.static <S extends Ordered<S>>
Smin(S a, S b, S... others) Performs min.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
min
Performs min.- Parameters:
a- the a valueb- the b value- Returns:
- the result of min
-
min
Performs min.- Parameters:
a- the a valueb- the b valueothers- the others value- Returns:
- the result of min
-
max
Performs max.- Parameters:
a- the a valueb- the b value- Returns:
- the result of max
-
max
Performs max.- Parameters:
a- the a valueb- the b valueothers- the others value- Returns:
- the result of max
-
isLessThan
Checks whether is Less Than.- Parameters:
other- the other value- Returns:
- the result of isLessThan
-
isLessThanOrEqualTo
Checks whether is Less Than Or Equal To.- Parameters:
other- the other value- Returns:
- the result of isLessThanOrEqualTo
-
isGreaterThan
Checks whether is Greater Than.- Parameters:
other- the other value- Returns:
- the result of isGreaterThan
-
isGreaterThanOrEqualTo
Checks whether is Greater Than Or Equal To.- Parameters:
other- the other value- Returns:
- the result of isGreaterThanOrEqualTo
-
isEqualTo
Checks whether is Equal To.- Parameters:
other- the other value- Returns:
- the result of isEqualTo
-