public final class Value
extends java.lang.Object
The value type, which is used by XML-RPC.
Modifier and Type | Method and Description |
---|---|
java.util.List<Value> |
getAsArray()
Gets the value as array or null.
|
boolean |
getAsBoolean()
Gets the value as boolean.
|
byte[] |
getAsByteArray()
Gets the value as byte array or null.
|
java.lang.Double |
getAsDouble()
Gets the value as double or null.
|
java.time.OffsetDateTime |
getAsInstant()
Gets the value as date or null.
|
java.lang.Integer |
getAsInteger()
Gets the value as integer or null.
|
java.util.Map<java.lang.String,Value> |
getAsMap()
Gets the value as map or null.
|
java.lang.String |
getAsString()
Gets the value as string or null.
|
static Value |
of(boolean b)
Creates a boolean value.
|
static Value |
of(byte[] bytes)
Creates a binary (base64) value.
|
static Value |
of(java.util.Collection<Value> list)
Creates an array type value.
|
static Value |
of(java.lang.Double d)
Creates a double value.
|
static Value |
of(java.lang.Integer integer)
Creates an integer value.
|
static Value |
of(java.util.Map<java.lang.String,Value> map)
Creates a struct type value.
|
static Value |
of(java.time.OffsetDateTime dateTime)
Creates a date value.
|
static Value |
of(java.lang.String string)
Creates a string value.
|
java.lang.String |
toString() |
public static Value of(java.lang.Integer integer)
Creates an integer value.
integer
- The integer value.public static Value of(java.lang.String string)
Creates a string value.
string
- The string value.public static Value of(java.lang.Double d)
Creates a double value.
d
- The double value.public static Value of(byte[] bytes)
Creates a binary (base64) value.
bytes
- The binary value.public static Value of(boolean b)
Creates a boolean value.
b
- The boolean value.public static Value of(java.time.OffsetDateTime dateTime)
Creates a date value.
dateTime
- The date time value.public static Value of(java.util.Collection<Value> list)
Creates an array type value.
list
- The array type value.public static Value of(java.util.Map<java.lang.String,Value> map)
Creates a struct type value.
map
- The struct type value.public final java.lang.Integer getAsInteger()
Gets the value as integer or null.
public final java.lang.Double getAsDouble()
Gets the value as double or null.
public final java.lang.String getAsString()
Gets the value as string or null.
public final byte[] getAsByteArray()
Gets the value as byte array or null.
public final boolean getAsBoolean()
Gets the value as boolean.
public final java.time.OffsetDateTime getAsInstant()
Gets the value as date or null.
public final java.util.List<Value> getAsArray()
Gets the value as array or null.
public final java.util.Map<java.lang.String,Value> getAsMap()
Gets the value as map or null.
public final java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2014–2019 XMPP.rocks. All rights reserved.