public final class NullNode extends Node
Node.NonNumericFloat
Constructor and Description |
---|
NullNode(SourceLocation sourceLocation) |
Modifier and Type | Method and Description |
---|---|
<R> R |
accept(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.
|
boolean |
equals(java.lang.Object other) |
NullNode |
expectNullNode(java.lang.String errorMessage)
Casts the current node to a
NullNode , throwing
ExpectationNotMetException when the node is the wrong type. |
NullNode |
expectNullNode(java.util.function.Supplier<java.lang.String> errorMessage)
Casts the current node to a
NullNode , throwing
ExpectationNotMetException when the node is the wrong type. |
NodeType |
getType()
Gets the type of the node.
|
int |
hashCode() |
java.lang.String |
toString() |
arrayNode, 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, 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
public NullNode(SourceLocation sourceLocation)
public <R> R accept(NodeVisitor<R> visitor)
Node
public NullNode expectNullNode(java.lang.String errorMessage)
Node
NullNode
, throwing
ExpectationNotMetException
when the node is the wrong type.expectNullNode
in class Node
errorMessage
- Error message to use if the node is of the wrong type.public NullNode expectNullNode(java.util.function.Supplier<java.lang.String> errorMessage)
Node
NullNode
, throwing
ExpectationNotMetException
when the node is the wrong type.expectNullNode
in class Node
errorMessage
- Error message supplier.public java.util.Optional<NullNode> asNullNode()
Node
asNullNode
in class Node
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object