org.eclipse.xtext.xbase.lib
Class BooleanExtensions

java.lang.Object
  extended by org.eclipse.xtext.xbase.lib.BooleanExtensions

public class BooleanExtensions
extends Object

This is an extension library for booleans.

Author:
Sven Efftinge - Initial contribution and API

Constructor Summary
BooleanExtensions()
           
 
Method Summary
static boolean operator_and(boolean a, boolean b)
          The logical and (conjunction).
static boolean operator_equals(boolean a, boolean b)
          The binary equals operator.
static boolean operator_not(boolean b)
          The logical not (negation).
static boolean operator_notEquals(boolean a, boolean b)
          The binary not equals operator.
static boolean operator_or(boolean a, boolean b)
          A logical or (disjunction).
static boolean xor(boolean a, boolean b)
          A logical xor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanExtensions

public BooleanExtensions()
Method Detail

operator_and

public static boolean operator_and(boolean a,
                                   boolean b)
The logical and (conjunction). This is the equivalent to the java && operator.

Parameters:
a - a boolean value.
b - another boolean value.
Returns:
a && b

operator_or

public static boolean operator_or(boolean a,
                                  boolean b)
A logical or (disjunction). This is the equivalent to the java || operator.

Parameters:
a - a boolean value.
b - another boolean value.
Returns:
a || b

operator_not

public static boolean operator_not(boolean b)
The logical not (negation). This is the equivalent to the java ! operator.

Parameters:
b - a boolean value.
Returns:
!b

operator_equals

public static boolean operator_equals(boolean a,
                                      boolean b)
The binary equals operator. This is the equivalent to the java == operator.

Parameters:
a - an boolean.
b - an boolean.
Returns:
a==b

operator_notEquals

public static boolean operator_notEquals(boolean a,
                                         boolean b)
The binary not equals operator. This is the equivalent to the java != operator.

Parameters:
a - an boolean.
b - an boolean.
Returns:
a!=b

xor

public static boolean xor(boolean a,
                          boolean b)
A logical xor. This is the equivalent to the java ^ operator.

Parameters:
a - a boolean value.
b - another boolean value.
Returns:
a ^ b


Copyright © 2012. All Rights Reserved.