Package io.github.qishr.cascara.common.lang.reference
Class ReferenceScalarNode
java.lang.Object
io.github.qishr.cascara.common.lang.reference.ReferenceNode
io.github.qishr.cascara.common.lang.reference.ReferenceScalarNode
All Implemented Interfaces:
ScalarAstNode<ReferenceNode>
public final class ReferenceScalarNode
extends ReferenceNode
Constructor Summary
| Constructor | Description |
|---|---|
| ReferenceScalarNode(Object value) | |
| ReferenceScalarNode(Object value, QuoteStyle quoteStyle) |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
| public ReferenceScalarNode | setQuoteStyle(QuoteStyle style) | |
| public String | getLexeme() | |
| public String | asString() | |
| public int | asInteger() | |
| public int | asInteger(int defaultValue) | |
| public double | asDouble() | |
| public double | asDouble(double defaultValue) | |
| public boolean | asBoolean() | |
| public boolean | asBoolean(boolean defaultValue) | |
| public Object | getPrimitive() | |
| public List<? extends AstNode> | getChildren() | |
| public List<CommentAstNode> | getComments() | |
| public QuoteStyle | getQuoteStyle() | |
| public String | getContent() | |
| public boolean | equals(Object o) | |
| public int | hashCode() | |
| public PrimitiveType | getPrimitiveType() |
Methods inherited from ReferenceNode
getEndColumn, getEndLine, getStartColumn, getToken, getStartLine
Method Details
setQuoteStyle
public ReferenceScalarNode setQuoteStyle(QuoteStyle style)
Specified By:
getLexeme
@io.github.qishr.cascara.common.lang.annotation.Nullable
public String getLexeme()
Specified By:
asString
public String asString()
Specified By:
asInteger
public int asInteger()
Specified By:
asInteger
public int asInteger(int defaultValue)
Specified By:
asDouble
public double asDouble()
Specified By:
asDouble
public double asDouble(double defaultValue)
Specified By:
asBoolean
public boolean asBoolean()
Specified By:
asBoolean
public boolean asBoolean(boolean defaultValue)
Specified By:
getPrimitive
@io.github.qishr.cascara.common.lang.annotation.Nullable
public Object getPrimitive()
Specified By:
getChildren
public List<? extends AstNode> getChildren()
getComments
public List<CommentAstNode> getComments()
getQuoteStyle
public QuoteStyle getQuoteStyle()
Specified By:
getContent
public String getContent()
Specified By:
equals
public boolean equals(Object o)
Overrides:
hashCode
public int hashCode()
Overrides:
getPrimitiveType
public PrimitiveType getPrimitiveType()
Specified By: