Package org.eclipse.xtext.xbase.lib
Class BooleanExtensions
- java.lang.Object
-
- org.eclipse.xtext.xbase.lib.BooleanExtensions
-
@GwtCompatible public class BooleanExtensions extends java.lang.ObjectThis is an extension library forbooleans.
-
-
Constructor Summary
Constructors Constructor Description BooleanExtensions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanoperator_and(boolean a, boolean b)The logicaland(conjunction).static booleanoperator_equals(boolean a, boolean b)The binaryequalsoperator.static booleanoperator_greaterEqualsThan(boolean a, boolean b)The binarygreaterEqualsThanoperator for boolean values.static booleanoperator_greaterThan(boolean a, boolean b)The binarygreaterThanoperator for boolean values.static booleanoperator_lessEqualsThan(boolean a, boolean b)The binarylessEqualsThanoperator for boolean values.static booleanoperator_lessThan(boolean a, boolean b)The binarylessThanoperator for boolean values.static booleanoperator_not(boolean b)The logicalnot(negation).static booleanoperator_notEquals(boolean a, boolean b)The binarynot equalsoperator.static booleanoperator_or(boolean a, boolean b)A logicalor(disjunction).static booleanxor(boolean a, boolean b)A logicalxor.
-
-
-
Method Detail
-
operator_and
@Pure public static boolean operator_and(boolean a, boolean b)
The logicaland(conjunction). This is the equivalent to the java&&operator.- Parameters:
a- a boolean value.b- another boolean value.- Returns:
a && b
-
operator_or
@Pure public static boolean operator_or(boolean a, boolean b)
A logicalor(disjunction). This is the equivalent to the java||operator.- Parameters:
a- a boolean value.b- another boolean value.- Returns:
a || b
-
operator_not
@Pure public static boolean operator_not(boolean b)
The logicalnot(negation). This is the equivalent to the java!operator.- Parameters:
b- a boolean value.- Returns:
!b
-
operator_equals
@Pure public static boolean operator_equals(boolean a, boolean b)
The binaryequalsoperator. This is the equivalent to the java==operator.- Parameters:
a- an boolean.b- an boolean.- Returns:
a==b
-
operator_notEquals
@Pure public static boolean operator_notEquals(boolean a, boolean b)
The binarynot equalsoperator. This is the equivalent to the java!=operator.- Parameters:
a- an boolean.b- an boolean.- Returns:
a!=b
-
xor
@Pure public static boolean xor(boolean a, boolean b)
A logicalxor. This is the equivalent to the java^operator.- Parameters:
a- a boolean value.b- another boolean value.- Returns:
a ^ b
-
operator_lessThan
@Pure public static boolean operator_lessThan(boolean a, boolean b)
The binarylessThanoperator for boolean values.falseis considered less thantrue.- Parameters:
a- a boolean.b- another boolean.- Returns:
Booleans.compare(a, b)<0- Since:
- 2.4
- See Also:
Boolean.compareTo(Boolean),Booleans.compare(boolean, boolean)
-
operator_lessEqualsThan
@Pure public static boolean operator_lessEqualsThan(boolean a, boolean b)
The binarylessEqualsThanoperator for boolean values.falseis considered less thantrue.- Parameters:
a- a boolean.b- another boolean.- Returns:
Booleans.compare(a, b)<=0- Since:
- 2.4
- See Also:
Boolean.compareTo(Boolean),Booleans.compare(boolean, boolean)
-
operator_greaterThan
@Pure public static boolean operator_greaterThan(boolean a, boolean b)
The binarygreaterThanoperator for boolean values.falseis considered less thantrue.- Parameters:
a- a boolean.b- another boolean.- Returns:
Booleans.compare(a, b)>0- Since:
- 2.4
- See Also:
Boolean.compareTo(Boolean),Booleans.compare(boolean, boolean)
-
operator_greaterEqualsThan
@Pure public static boolean operator_greaterEqualsThan(boolean a, boolean b)
The binarygreaterEqualsThanoperator for boolean values.falseis considered less thantrue.- Parameters:
a- a boolean.b- another boolean.- Returns:
Booleans.compare(a, b)>=0- Since:
- 2.4
- See Also:
Boolean.compareTo(Boolean),Booleans.compare(boolean, boolean)
-
-