final class BytesModelValue extends ModelValue
| Modifier and Type | Field and Description |
|---|---|
private byte[] |
bytes |
static java.lang.String |
TYPE_KEY
JSON Key used to identify BytesModelValue.
|
UNDEFINED| Constructor and Description |
|---|
BytesModelValue(byte[] bytes) |
BytesModelValue(java.io.DataInput in) |
| Modifier and Type | Method and Description |
|---|---|
(package private) java.math.BigDecimal |
asBigDecimal() |
(package private) java.math.BigInteger |
asBigInteger() |
(package private) byte[] |
asBytes() |
(package private) double |
asDouble() |
(package private) double |
asDouble(double defVal) |
(package private) int |
asInt() |
(package private) int |
asInt(int defVal) |
(package private) long |
asLong() |
(package private) long |
asLong(long defVal) |
(package private) java.lang.String |
asString() |
boolean |
equals(BytesModelValue other)
Determine whether this object is equal to another.
|
boolean |
equals(java.lang.Object other)
Determine whether this object is equal to another.
|
(package private) void |
format(java.io.PrintWriter writer,
int indent,
boolean multiLine)
Formats the current value object as part of a DMR string.
|
(package private) void |
formatAsJSON(java.io.PrintWriter writer,
int indent,
boolean multiLine)
Formats the current value object as part of a JSON string.
|
(package private) void |
formatMultiLine(java.io.PrintWriter writer,
int indent) |
int |
hashCode() |
(package private) void |
writeExternal(java.io.DataOutput out) |
addChild, asBoolean, asBoolean, asExpression, asList, asObject, asProperty, asPropertyList, asType, clone, copy, getChild, getChild, getKeys, getType, has, has, indent, insertChild, jsonEscape, protect, quote, removeChild, removeChild, requireChild, requireChild, resolve, toJSONString, toString, writeJSONString, writeStringpublic static final java.lang.String TYPE_KEY
private final byte[] bytes
BytesModelValue(byte[] bytes)
BytesModelValue(java.io.DataInput in)
throws java.io.IOException
java.io.IOExceptionvoid writeExternal(java.io.DataOutput out)
throws java.io.IOException
writeExternal in class ModelValuejava.io.IOExceptionlong asLong()
asLong in class ModelValuelong asLong(long defVal)
asLong in class ModelValueint asInt()
asInt in class ModelValueint asInt(int defVal)
asInt in class ModelValuedouble asDouble()
asDouble in class ModelValuedouble asDouble(double defVal)
asDouble in class ModelValuejava.math.BigDecimal asBigDecimal()
asBigDecimal in class ModelValuejava.math.BigInteger asBigInteger()
asBigInteger in class ModelValuebyte[] asBytes()
asBytes in class ModelValuejava.lang.String asString()
asString in class ModelValuevoid formatAsJSON(java.io.PrintWriter writer,
int indent,
boolean multiLine)
ModelValueformatAsJSON in class ModelValuewriter - A PrintWriter instance containing the JSON string.indent - The number of tabs to indent the current generated string.multiLine - Flag that indicates whether or not the string should
begin on a new line.void format(java.io.PrintWriter writer,
int indent,
boolean multiLine)
ModelValueformat in class ModelValuewriter - A PrintWriter instance containing the generated DMR string representation.indent - The number of tabs to indent the current generated string.multiLine - Flag indicating whether or not the string should begin on a new line.void formatMultiLine(java.io.PrintWriter writer,
int indent)
public boolean equals(java.lang.Object other)
equals in class ModelValueother - the other objecttrue if they are equal, false otherwisepublic boolean equals(BytesModelValue other)
other - the other objecttrue if they are equal, false otherwisepublic int hashCode()
hashCode in class ModelValue