Enum BooleanLiteralSet
- java.lang.Object
-
- java.lang.Enum<BooleanLiteralSet>
-
- com.google.javascript.rhino.jstype.BooleanLiteralSet
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<BooleanLiteralSet>
public enum BooleanLiteralSet extends java.lang.Enum<BooleanLiteralSet>
A set in the domain {true,false}. There are four possible sets: {}, {true}, {false}, {true,false}.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(boolean literalValue)
Returns whetherthis
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 andthat
.TernaryValue
toTernaryValue()
Converts to a TernaryValue.BooleanLiteralSet
union(BooleanLiteralSet that)
Computes the union of this set andthat
.static BooleanLiteralSet
valueOf(java.lang.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.
-
-
-
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(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
intersection
public BooleanLiteralSet intersection(BooleanLiteralSet that)
Computes the intersection of this set andthat
.
-
union
public BooleanLiteralSet union(BooleanLiteralSet that)
Computes the union of this set andthat
.
-
contains
public boolean contains(boolean literalValue)
Returns whetherthis
contains the given literal value.
-
get
public static BooleanLiteralSet get(boolean literalValue)
Returns the singleton set {literalValue}.
-
toTernaryValue
public TernaryValue toTernaryValue()
Converts to a TernaryValue.
-
-