Class ImmutableJsonNumber
java.lang.Object
ch.nolix.base.document.json.ImmutableJsonNumber
- All Implemented Interfaces:
FormattedStringRepresentable, JsonNumber, JsonValue, NodeRepresentable
- Author:
- Silvan Wyss
-
Field Summary
Fields inherited from interface FormattedStringRepresentable
DEFAULT_IDENTATION_LEVEL, DEFAULT_IDENTTATION_SYMBOL, DEFAULT_START_MULTILINER_WITH_IDENTATION_FLAG -
Method Summary
Modifier and TypeMethodDescriptionbooleangetType()toFormattedStringWithIndentationLevelAndIndentationSymbol(int indentationLevel, String indentationSymbol, boolean startMultiLinerWithIndentation) Node<?> toNode()static JsonValuewithNumber(int number) static ImmutableJsonNumberwithNumber(BigDecimal number) Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FormattedStringRepresentable
toFormattedString, toFormattedStringWithIndentationLevel, toFormattedStringWithIndentationLevelAndIndentationSymbol
-
Method Details
-
withNumber
-
withNumber
-
formattedStringWillHaveMultipleLines
public boolean formattedStringWillHaveMultipleLines()- Specified by:
formattedStringWillHaveMultipleLinesin interfaceFormattedStringRepresentable- Returns:
- true if a formatted
Stringrepresentation of the currentFormattedStringRepresentablewill have multiple lines, false otherwise
-
getNumber
- Specified by:
getNumberin interfaceJsonNumber
-
getType
-
toFormattedStringWithIndentationLevelAndIndentationSymbol
public String toFormattedStringWithIndentationLevelAndIndentationSymbol(int indentationLevel, String indentationSymbol, boolean startMultiLinerWithIndentation) - Specified by:
toFormattedStringWithIndentationLevelAndIndentationSymbolin interfaceFormattedStringRepresentable- Parameters:
indentationLevel-indentationSymbol-startMultiLinerWithIndentation-- Returns:
- a formatted
Stringrepresentation of the currentFormattedStringRepresentablewith the given indentationLevel and indentationSymbol
-
toNode
- Specified by:
toNodein interfaceNodeRepresentable- Returns:
- a new immutable
Nodethat represents the currentNodeRepresentable
-