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