Class BooleanNode
java.lang.Object
software.amazon.smithy.model.node.Node
software.amazon.smithy.model.node.BooleanNode
- All Implemented Interfaces:
FromSourceLocation
,ToNode
Represents a boolean node.
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.smithy.model.node.Node
Node.NonNumericFloat
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<R> R
accept
(NodeVisitor<R> visitor) Accepts a visitor with the node.Gets the node as an BooleanNode if it is an boolean.boolean
expectBooleanNode
(String errorMessage) Casts the current node to aBooleanNode
, throwingExpectationNotMetException
when the node is the wrong type.expectBooleanNode
(Supplier<String> errorMessage) Casts the current node to aBooleanNode
, throwingExpectationNotMetException
when the node is the wrong type.getType()
Gets the type of the node.boolean
getValue()
Gets the true or false value of the boolean node.int
hashCode()
toString()
Methods inherited from class software.amazon.smithy.model.node.Node
arrayNode, arrayNode, asArrayNode, asNullNode, asNumberNode, asObjectNode, assertEquals, asStringNode, diff, expectArrayNode, expectArrayNode, expectArrayNode, expectBooleanNode, expectNullNode, expectNullNode, expectNullNode, expectNumberNode, expectNumberNode, expectNumberNode, expectObjectNode, expectObjectNode, expectObjectNode, expectStringNode, expectStringNode, expectStringNode, from, from, from, from, fromNodes, fromNodes, fromStrings, fromStrings, getSourceLocation, isArrayNode, isBooleanNode, isNullNode, isNumberNode, isObjectNode, isStringNode, loadArrayOfString, nullNode, objectNode, objectNode, objectNodeBuilder, parse, parse, parse, parse, parseJsonWithComments, parseJsonWithComments, prettyPrintJson, prettyPrintJson, printJson, toNode, withDeepSortedKeys, withDeepSortedKeys
-
Constructor Details
-
BooleanNode
-
-
Method Details
-
getValue
public boolean getValue()Gets the true or false value of the boolean node.- Returns:
- Returns true or false.
-
getType
Description copied from class:Node
Gets the type of the node. -
accept
Description copied from class:Node
Accepts a visitor with the node. -
expectBooleanNode
Description copied from class:Node
Casts the current node to aBooleanNode
, throwingExpectationNotMetException
when the node is the wrong type.- Overrides:
expectBooleanNode
in classNode
- Parameters:
errorMessage
- Error message to use if the node is of the wrong type.- Returns:
- Returns a boolean node.
-
expectBooleanNode
Description copied from class:Node
Casts the current node to aBooleanNode
, throwingExpectationNotMetException
when the node is the wrong type.- Overrides:
expectBooleanNode
in classNode
- Parameters:
errorMessage
- Error message supplier.- Returns:
- Returns a boolean node.
-
asBooleanNode
Description copied from class:Node
Gets the node as an BooleanNode if it is an boolean.- Overrides:
asBooleanNode
in classNode
- Returns:
- Returns the optional BooleanNode.
-
equals
-
hashCode
public int hashCode() -
toString
-