java.lang.Object
org.eclipse.xtext.xbase.lib.BooleanExtensions
This is an extension library for
booleans.- Author:
- Sven Efftinge - Initial contribution and API
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
Constructor Details
-
BooleanExtensions
public BooleanExtensions()
-
-
Method Details
-
operator_and
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
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
The logicalnot(negation). This is the equivalent to the java!operator.- Parameters:
b- a boolean value.- Returns:
!b
-
operator_equals
The binaryequalsoperator. This is the equivalent to the java==operator.- Parameters:
a- an boolean.b- an boolean.- Returns:
a==b
-
operator_notEquals
The binarynot equalsoperator. This is the equivalent to the java!=operator.- Parameters:
a- an boolean.b- an boolean.- Returns:
a!=b
-
xor
A logicalxor. This is the equivalent to the java^operator.- Parameters:
a- a boolean value.b- another boolean value.- Returns:
a ^ b
-
operator_lessThan
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
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
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
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)
-