Top Description Constructors Methods
org.eclipse.xtext.xbase.lib

public Class BooleanExtensions

extends Object
Class Inheritance
Annotations
@GwtCompatible
Imports
com.google.common.annotations.GwtCompatible, com.google.common.primitives.Booleans

This is an extension library for booleans.
Author
Sven Efftinge - Initial contribution and API

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static boolean

Returns:

a && b
operator_and
(boolean
a boolean value.
a
,
boolean
another boolean value.
b
)

The logical and (conjunction).

public static boolean

Returns:

a==b
operator_equals
(boolean
an boolean.
a
,
boolean
an boolean.
b
)

The binary equals operator.

public static boolean

Returns:

Booleans.compare(a, b)>=0
operator_greaterEqualsThan
(boolean
a boolean.
a
,
boolean
another boolean.
b
)

The binary greaterEqualsThan operator for boolean values.

public static boolean

Returns:

Booleans.compare(a, b)>0
operator_greaterThan
(boolean
a boolean.
a
,
boolean
another boolean.
b
)

The binary greaterThan operator for boolean values.

public static boolean

Returns:

Booleans.compare(a, b)<=0
operator_lessEqualsThan
(boolean
a boolean.
a
,
boolean
another boolean.
b
)

The binary lessEqualsThan operator for boolean values.

public static boolean

Returns:

Booleans.compare(a, b)<0
operator_lessThan
(boolean
a boolean.
a
,
boolean
another boolean.
b
)

The binary lessThan operator for boolean values.

public static boolean

Returns:

!b
operator_not
(boolean
a boolean value.
b
)

The logical not (negation).

public static boolean

Returns:

a!=b
operator_notEquals
(boolean
an boolean.
a
,
boolean
an boolean.
b
)

The binary not equals operator.

public static boolean

Returns:

a || b
operator_or
(boolean
a boolean value.
a
,
boolean
another boolean value.
b
)

A logical or (disjunction).

public static boolean

Returns:

a ^ b
xor
(boolean
a boolean value.
a
,
boolean
another boolean value.
b
)

A logical xor.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

BooleanExtensionsback to summary
public BooleanExtensions()

Method Detail

operator_andback to summary
public static boolean operator_and(boolean a, boolean b)

The logical and (conjunction). This is the equivalent to the java && operator.

Parameters
a:boolean

a boolean value.

b:boolean

another boolean value.

Returns:boolean

a && b

Annotations
@Pure
@Inline:($1 && $2)
constantExpression:true
operator_equalsback to summary
public static boolean operator_equals(boolean a, boolean b)

The binary equals operator. This is the equivalent to the java == operator.

Parameters
a:boolean

an boolean.

b:boolean

an boolean.

Returns:boolean

a==b

Annotations
@Pure
@Inline:($1 == $2)
constantExpression:true
operator_greaterEqualsThanback to summary
public static boolean operator_greaterEqualsThan(boolean a, boolean b)

The binary greaterEqualsThan operator for boolean values. false is considered less than true.

Parameters
a:boolean

a boolean.

b:boolean

another boolean.

Returns:boolean

Booleans.compare(a, b)>=0

Annotations
@Pure
@Inline:($3.compare($1, $2) >= 0)
imported:Booleans
Since
2.4
See Also
Boolean#compareTo(Boolean), Booleans#compare(boolean, boolean)
operator_greaterThanback to summary
public static boolean operator_greaterThan(boolean a, boolean b)

The binary greaterThan operator for boolean values. false is considered less than true.

Parameters
a:boolean

a boolean.

b:boolean

another boolean.

Returns:boolean

Booleans.compare(a, b)>0

Annotations
@Pure
@Inline:($3.compare($1, $2) > 0)
imported:Booleans
Since
2.4
See Also
Boolean#compareTo(Boolean), Booleans#compare(boolean, boolean)
operator_lessEqualsThanback to summary
public static boolean operator_lessEqualsThan(boolean a, boolean b)

The binary lessEqualsThan operator for boolean values. false is considered less than true.

Parameters
a:boolean

a boolean.

b:boolean

another boolean.

Returns:boolean

Booleans.compare(a, b)<=0

Annotations
@Pure
@Inline:($3.compare($1, $2) <= 0)
imported:Booleans
Since
2.4
See Also
Boolean#compareTo(Boolean), Booleans#compare(boolean, boolean)
operator_lessThanback to summary
public static boolean operator_lessThan(boolean a, boolean b)

The binary lessThan operator for boolean values. false is considered less than true.

Parameters
a:boolean

a boolean.

b:boolean

another boolean.

Returns:boolean

Booleans.compare(a, b)<0

Annotations
@Pure
@Inline:($3.compare($1, $2) < 0)
imported:Booleans
Since
2.4
See Also
Boolean#compareTo(Boolean), Booleans#compare(boolean, boolean)
operator_notback to summary
public static boolean operator_not(boolean b)

The logical not (negation). This is the equivalent to the java ! operator.

Parameters
b:boolean

a boolean value.

Returns:boolean

!b

Annotations
@Pure
@Inline:(!$1)
constantExpression:true
operator_notEqualsback to summary
public static boolean operator_notEquals(boolean a, boolean b)

The binary not equals operator. This is the equivalent to the java != operator.

Parameters
a:boolean

an boolean.

b:boolean

an boolean.

Returns:boolean

a!=b

Annotations
@Pure
@Inline:($1 != $2)
constantExpression:true
operator_orback to summary
public static boolean operator_or(boolean a, boolean b)

A logical or (disjunction). This is the equivalent to the java || operator.

Parameters
a:boolean

a boolean value.

b:boolean

another boolean value.

Returns:boolean

a || b

Annotations
@Pure
@Inline:($1 || $2)
constantExpression:true
xorback to summary
public static boolean xor(boolean a, boolean b)

A logical xor. This is the equivalent to the java ^ operator.

Parameters
a:boolean

a boolean value.

b:boolean

another boolean value.

Returns:boolean

a ^ b

Annotations
@Pure
@Inline:($1 ^ $2)