Package org.eclipse.xtext.xbase.lib
Class BooleanExtensions
- java.lang.Object
-
- org.eclipse.xtext.xbase.lib.BooleanExtensions
-
@GwtCompatible public class BooleanExtensions extends java.lang.Object
This 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 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
.
-
-
-
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 binaryequals
operator. 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 equals
operator. 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 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
@Pure public static boolean operator_lessEqualsThan(boolean a, boolean b)
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
@Pure public static boolean operator_greaterThan(boolean a, boolean b)
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
@Pure public static boolean operator_greaterEqualsThan(boolean a, boolean b)
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)
-
-