java.lang.Object
org.eclipse.xtext.xbase.lib.ComparableExtensions
This is an extension library for
comparables.- Author:
- Sven Efftinge - Initial contribution and API
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <C> booleanoperator_greaterEqualsThan(Comparable<? super C> left, C right) The comparison operatorgreater than or equals.static <C> booleanoperator_greaterThan(Comparable<? super C> left, C right) The comparison operatorgreater than.static <C> booleanoperator_lessEqualsThan(Comparable<? super C> left, C right) The comparison operatorless than or equals.static <C> booleanoperator_lessThan(Comparable<? super C> left, C right) The comparison operatorless than.static <C> intoperator_spaceship(Comparable<? super C> left, C right) The spaceship operator<=>.
-
Constructor Details
-
ComparableExtensions
public ComparableExtensions()
-
-
Method Details
-
operator_lessThan
The comparison operatorless than.- Parameters:
left- a comparableright- the value to compare with- Returns:
left.compareTo(right) < 0
-
operator_greaterThan
The comparison operatorgreater than.- Parameters:
left- a comparableright- the value to compare with- Returns:
left.compareTo(right) > 0
-
operator_lessEqualsThan
The comparison operatorless than or equals.- Parameters:
left- a comparableright- the value to compare with- Returns:
left.compareTo(right) <= 0
-
operator_greaterEqualsThan
The comparison operatorgreater than or equals.- Parameters:
left- a comparableright- the value to compare with- Returns:
left.compareTo(right) >= 0
-
operator_spaceship
The spaceship operator<=>.- Parameters:
left- a comparableright- the value to compare with- Returns:
left.compareTo(right)- Since:
- 2.4
-