com.google.javascript.rhino.jstype
Enum BooleanLiteralSet

java.lang.Object
  extended by java.lang.Enum<BooleanLiteralSet>
      extended by com.google.javascript.rhino.jstype.BooleanLiteralSet
All Implemented Interfaces:
Serializable, Comparable<BooleanLiteralSet>

public enum BooleanLiteralSet
extends Enum<BooleanLiteralSet>

A set in the domain {true,false}. There are four possible sets: {}, {true}, {false}, {true,false}.


Enum Constant Summary
BOTH
           
EMPTY
           
FALSE
           
TRUE
           
 
Method Summary
 boolean contains(boolean literalValue)
          Returns whether this contains the given literal value.
static BooleanLiteralSet get(boolean literalValue)
          Returns the singleton set {literalValue}.
 BooleanLiteralSet intersection(BooleanLiteralSet that)
          Computes the intersection of this set and that.
 BooleanLiteralSet union(BooleanLiteralSet that)
          Computes the union of this set and that.
static BooleanLiteralSet valueOf(String name)
          Returns the enum constant of this type with the specified name.
static BooleanLiteralSet[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

EMPTY

public static final BooleanLiteralSet EMPTY

TRUE

public static final BooleanLiteralSet TRUE

FALSE

public static final BooleanLiteralSet FALSE

BOTH

public static final BooleanLiteralSet BOTH
Method Detail

values

public static BooleanLiteralSet[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (BooleanLiteralSet c : BooleanLiteralSet.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static BooleanLiteralSet valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

intersection

public BooleanLiteralSet intersection(BooleanLiteralSet that)
Computes the intersection of this set and that.


union

public BooleanLiteralSet union(BooleanLiteralSet that)
Computes the union of this set and that.


contains

public boolean contains(boolean literalValue)
Returns whether this contains the given literal value.


get

public static BooleanLiteralSet get(boolean literalValue)
Returns the singleton set {literalValue}.