public enum BooleanLiteral extends java.lang.Enum<BooleanLiteral> implements Literal
BooleanLiteral
denotes the nonterminal symbol BooleanLiteral, as defined by the Java Language Specification.
If the Java Language Specification is updated in a way that affects the boolean
type, this enum may be updated to reflect those changes. This means that new elements could be added. But it's highly unlikely.
Enum Constant and Description |
---|
FALSE
A
BooleanLiteral representing false . |
TRUE
A
BooleanLiteral representing true . |
Modifier and Type | Method and Description |
---|---|
static BooleanLiteral |
not(BooleanLiteral booleanLiteral)
Returns a negated version of the given
BooleanLiteral instance. |
boolean |
toBoolean()
Returns a
boolean representation of this BooleanLiteral instance. |
java.lang.String |
toString()
Returns a
String representation of this BooleanLiteral instance. |
static BooleanLiteral |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static BooleanLiteral[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BooleanLiteral FALSE
BooleanLiteral
representing false
.public static final BooleanLiteral TRUE
BooleanLiteral
representing true
.public static BooleanLiteral[] values()
for (BooleanLiteral c : BooleanLiteral.values()) System.out.println(c);
public static BooleanLiteral valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean toBoolean()
boolean
representation of this BooleanLiteral
instance.boolean
representation of this BooleanLiteral
instancepublic java.lang.String toString()
String
representation of this BooleanLiteral
instance.toString
in class java.lang.Enum<BooleanLiteral>
String
representation of this BooleanLiteral
instancepublic static BooleanLiteral not(BooleanLiteral booleanLiteral)
BooleanLiteral
instance.
If booleanLiteral
is null
, a NullPointerException
will be thrown.
If you import members from this class statically, the expression not(TRUE)
will return FALSE
.
booleanLiteral
- the BooleanLiteral
to negateBooleanLiteral
instancejava.lang.NullPointerException
- thrown if, and only if, booleanLiteral
is null