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 boolean
operator_and
(boolean a, boolean b) The logicaland
(conjunction).static boolean
operator_equals
(boolean a, boolean b) The binaryequals
operator.static boolean
operator_greaterEqualsThan
(boolean a, boolean b) The binarygreaterEqualsThan
operator for boolean values.static boolean
operator_greaterThan
(boolean a, boolean b) The binarygreaterThan
operator for boolean values.static boolean
operator_lessEqualsThan
(boolean a, boolean b) The binarylessEqualsThan
operator for boolean values.static boolean
operator_lessThan
(boolean a, boolean b) The binarylessThan
operator for boolean values.static boolean
operator_not
(boolean b) The logicalnot
(negation).static boolean
operator_notEquals
(boolean a, boolean b) The binarynot equals
operator.static boolean
operator_or
(boolean a, boolean b) A logicalor
(disjunction).static boolean
xor
(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 binaryequals
operator. This is the equivalent to the java==
operator.- Parameters:
a
- an boolean.b
- an boolean.- Returns:
a==b
-
operator_notEquals
The binarynot equals
operator. 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 binarylessThan
operator for boolean values.false
is 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 binarylessEqualsThan
operator for boolean values.false
is 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 binarygreaterThan
operator for boolean values.false
is 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 binarygreaterEqualsThan
operator for boolean values.false
is 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)
-