Package org.eclipse.xtext.xbase.lib
Class ComparableExtensions
- java.lang.Object
-
- org.eclipse.xtext.xbase.lib.ComparableExtensions
-
@GwtCompatible public class ComparableExtensions extends java.lang.ObjectThis is an extension library forcomparables.
-
-
Constructor Summary
Constructors Constructor Description ComparableExtensions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <C> booleanoperator_greaterEqualsThan(java.lang.Comparable<? super C> left, C right)The comparison operatorgreater than or equals.static <C> booleanoperator_greaterThan(java.lang.Comparable<? super C> left, C right)The comparison operatorgreater than.static <C> booleanoperator_lessEqualsThan(java.lang.Comparable<? super C> left, C right)The comparison operatorless than or equals.static <C> booleanoperator_lessThan(java.lang.Comparable<? super C> left, C right)The comparison operatorless than.static <C> intoperator_spaceship(java.lang.Comparable<? super C> left, C right)The spaceship operator<=>.
-
-
-
Method Detail
-
operator_lessThan
@Pure public static <C> boolean operator_lessThan(java.lang.Comparable<? super C> left, C right)
The comparison operatorless than.- Parameters:
left- a comparableright- the value to compare with- Returns:
left.compareTo(right) < 0
-
operator_greaterThan
@Pure public static <C> boolean operator_greaterThan(java.lang.Comparable<? super C> left, C right)
The comparison operatorgreater than.- Parameters:
left- a comparableright- the value to compare with- Returns:
left.compareTo(right) > 0
-
operator_lessEqualsThan
@Pure public static <C> boolean operator_lessEqualsThan(java.lang.Comparable<? super C> left, C right)
The comparison operatorless than or equals.- Parameters:
left- a comparableright- the value to compare with- Returns:
left.compareTo(right) <= 0
-
operator_greaterEqualsThan
@Pure public static <C> boolean operator_greaterEqualsThan(java.lang.Comparable<? super C> left, C right)
The comparison operatorgreater than or equals.- Parameters:
left- a comparableright- the value to compare with- Returns:
left.compareTo(right) >= 0
-
operator_spaceship
@Pure public static <C> int operator_spaceship(java.lang.Comparable<? super C> left, C right)
The spaceship operator<=>.- Parameters:
left- a comparableright- the value to compare with- Returns:
left.compareTo(right)- Since:
- 2.4
-
-