Class BooleanExtensions

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

@GwtCompatible public class BooleanExtensions extends Object
This is an extension library for booleans.
Author:
Sven Efftinge - Initial contribution and API
  • Constructor Details

    • BooleanExtensions

      public BooleanExtensions()
  • Method Details

    • operator_and

      @Pure 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

      @Pure 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

      @Pure 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

      @Pure 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

      @Pure 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

      @Pure 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
    • operator_lessThan

      @Pure public static boolean operator_lessThan(boolean a, boolean b)
      The binary lessThan operator for boolean values. false is considered less than true.
      Parameters:
      a - a boolean.
      b - another boolean.
      Returns:
      Booleans.compare(a, b)<0
      Since:
      2.4
      See Also:
    • operator_lessEqualsThan

      @Pure public static boolean operator_lessEqualsThan(boolean a, boolean b)
      The binary lessEqualsThan operator for boolean values. false is considered less than true.
      Parameters:
      a - a boolean.
      b - another boolean.
      Returns:
      Booleans.compare(a, b)<=0
      Since:
      2.4
      See Also:
    • operator_greaterThan

      @Pure public static boolean operator_greaterThan(boolean a, boolean b)
      The binary greaterThan operator for boolean values. false is considered less than true.
      Parameters:
      a - a boolean.
      b - another boolean.
      Returns:
      Booleans.compare(a, b)>0
      Since:
      2.4
      See Also:
    • operator_greaterEqualsThan

      @Pure public static boolean operator_greaterEqualsThan(boolean a, boolean b)
      The binary greaterEqualsThan operator for boolean values. false is considered less than true.
      Parameters:
      a - a boolean.
      b - another boolean.
      Returns:
      Booleans.compare(a, b)>=0
      Since:
      2.4
      See Also: