Class NullNode
- java.lang.Object
- 
- software.amazon.smithy.model.node.Node
- 
- software.amazon.smithy.model.node.NullNode
 
 
- 
- All Implemented Interfaces:
- FromSourceLocation,- ToNode
 
 public final class NullNode extends Node Represents a null node.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class software.amazon.smithy.model.node.NodeNode.NonNumericFloat
 
- 
 - 
Constructor SummaryConstructors Constructor Description NullNode(SourceLocation sourceLocation)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> Raccept(NodeVisitor<R> visitor)Accepts a visitor with the node.java.util.Optional<NullNode>asNullNode()Gets the node as an NullNode if it is a null.booleanequals(java.lang.Object other)NullNodeexpectNullNode(java.lang.String errorMessage)Casts the current node to aNullNode, throwingExpectationNotMetExceptionwhen the node is the wrong type.NullNodeexpectNullNode(java.util.function.Supplier<java.lang.String> errorMessage)Casts the current node to aNullNode, throwingExpectationNotMetExceptionwhen the node is the wrong type.NodeTypegetType()Gets the type of the node.inthashCode()java.lang.StringtoString()- 
Methods inherited from class software.amazon.smithy.model.node.NodearrayNode, arrayNode, asArrayNode, asBooleanNode, asNumberNode, asObjectNode, assertEquals, asStringNode, diff, expectArrayNode, expectArrayNode, expectArrayNode, expectBooleanNode, expectBooleanNode, expectBooleanNode, 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 Detail- 
NullNodepublic NullNode(SourceLocation sourceLocation) 
 
- 
 - 
Method Detail- 
acceptpublic <R> R accept(NodeVisitor<R> visitor) Description copied from class:NodeAccepts a visitor with the node.
 - 
expectNullNodepublic NullNode expectNullNode(java.lang.String errorMessage) Description copied from class:NodeCasts the current node to aNullNode, throwingExpectationNotMetExceptionwhen the node is the wrong type.- Overrides:
- expectNullNodein class- Node
- Parameters:
- errorMessage- Error message to use if the node is of the wrong type.
- Returns:
- Returns a null node.
 
 - 
expectNullNodepublic NullNode expectNullNode(java.util.function.Supplier<java.lang.String> errorMessage) Description copied from class:NodeCasts the current node to aNullNode, throwingExpectationNotMetExceptionwhen the node is the wrong type.- Overrides:
- expectNullNodein class- Node
- Parameters:
- errorMessage- Error message supplier.
- Returns:
- Returns a null node.
 
 - 
asNullNodepublic java.util.Optional<NullNode> asNullNode() Description copied from class:NodeGets the node as an NullNode if it is a null.- Overrides:
- asNullNodein class- Node
- Returns:
- Returns the optional NullNode.
 
 - 
equalspublic boolean equals(java.lang.Object other) - Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-