Class BooleanLiteral
- java.lang.Object
-
- software.amazon.smithy.rulesengine.language.syntax.SyntaxElement
-
- software.amazon.smithy.rulesengine.language.syntax.expressions.Expression
-
- software.amazon.smithy.rulesengine.language.syntax.expressions.literal.Literal
-
- software.amazon.smithy.rulesengine.language.syntax.expressions.literal.BooleanLiteral
-
- All Implemented Interfaces:
FromSourceLocation,ToNode,TypeCheck,ToCondition,ToExpression
public final class BooleanLiteral extends Literal
A boolean literal value, containing true or false.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Taccept(LiteralVisitor<T> visitor)java.util.Optional<java.lang.Boolean>asBooleanLiteral()booleanequals(java.lang.Object obj)inthashCode()NodetoNode()Converts a value to aNode.java.lang.StringtoString()BooleanNodevalue()Gets theBooleanNodevalue of this literal.-
Methods inherited from class software.amazon.smithy.rulesengine.language.syntax.expressions.literal.Literal
accept, asIntegerLiteral, asRecordLiteral, asStringLiteral, asTupleLiteral, booleanLiteral, evaluate, fromNode, integerLiteral, recordLiteral, stringLiteral, tupleLiteral, typeCheckLocal
-
Methods inherited from class software.amazon.smithy.rulesengine.language.syntax.expressions.Expression
getLiteral, getReference, getSourceLocation, of, of, of, parseShortform, toConditionBuilder, toExpression, type, typeCheck
-
Methods inherited from class software.amazon.smithy.rulesengine.language.syntax.SyntaxElement
booleanEqual, getAttr, getAttr, isSet, isValidHostLabel, not, parseUrl, stringEqual, substring, template
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.smithy.rulesengine.language.syntax.ToCondition
toCondition, toCondition
-
-
-
-
Method Detail
-
value
public BooleanNode value()
Gets theBooleanNodevalue of this literal.- Returns:
- the literal's value node.
-
accept
public <T> T accept(LiteralVisitor<T> visitor)
-
asBooleanLiteral
public java.util.Optional<java.lang.Boolean> asBooleanLiteral()
- Overrides:
asBooleanLiteralin classLiteral
-
toNode
public Node toNode()
Description copied from interface:ToNodeConverts a value to aNode.- Returns:
- Returns the creates Node.
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin classExpression
-
hashCode
public int hashCode()
- Specified by:
hashCodein classExpression
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-