public interface Splittable
Modifier and Type | Field and Description |
---|---|
static Splittable |
NULL
A value that represents
null . |
Modifier and Type | Method and Description |
---|---|
boolean |
asBoolean()
Returns a boolean representation of the data.
|
double |
asNumber()
Returns a numeric representation of the data.
|
void |
assign(Splittable parent,
int index)
Assign the splittable to the specified index of the
parent object. |
void |
assign(Splittable parent,
java.lang.String propertyName)
Assign the splittable to the named property of the
parent object. |
java.lang.String |
asString()
Returns a string representation of the data.
|
Splittable |
deepCopy()
Clones the Splittable, ignoring cycles and tags.
|
Splittable |
get(int index)
Returns the nth element of a list.
|
Splittable |
get(java.lang.String key)
Returns the named property.
|
java.lang.String |
getPayload()
Returns a wire-format representation of the data.
|
java.util.List<java.lang.String> |
getPropertyKeys()
Returns all keys available in the Splittable.
|
java.lang.Object |
getReified(java.lang.String key)
Returns a value previously set with
setReified(String, Object) . |
boolean |
isBoolean()
Returns
true if the value of the Splittable is a boolean. |
boolean |
isIndexed()
|
boolean |
isKeyed()
Returns true if
getPropertyKeys() and get(String)
can be expected to return meaningful values. |
boolean |
isNull(int index)
Indicates if the nth element of a list is null or undefined.
|
boolean |
isNull(java.lang.String key)
Indicates if the named property is null or undefined.
|
boolean |
isNumber()
Returns
true if the value of the Splittable is numeric. |
boolean |
isReified(java.lang.String key)
Returns
true if setReified(String, Object) has been called
with the given key. |
boolean |
isString()
Returns true if
asString() can be expected to return a
meaningful value. |
boolean |
isUndefined(java.lang.String key)
Returns
true if the value of the key is undefined. |
void |
removeReified(java.lang.String key)
Removes a tag value from the Splittable.
|
void |
setReified(java.lang.String key,
java.lang.Object object)
Associates a tag value with the Splittable.
|
void |
setSize(int i)
Resets the length of an indexed Splittable.
|
int |
size()
Returns the size of an indexed Splittable.
|
static final Splittable NULL
null
.boolean asBoolean()
double asNumber()
void assign(Splittable parent, int index)
parent
object.void assign(Splittable parent, java.lang.String propertyName)
parent
object.java.lang.String asString()
Splittable deepCopy()
Splittable get(int index)
Splittable get(java.lang.String key)
java.lang.String getPayload()
java.util.List<java.lang.String> getPropertyKeys()
java.lang.Object getReified(java.lang.String key)
setReified(String, Object)
.boolean isBoolean()
true
if the value of the Splittable is a boolean.boolean isIndexed()
boolean isKeyed()
getPropertyKeys()
and get(String)
can be expected to return meaningful values.boolean isNull(int index)
boolean isNull(java.lang.String key)
boolean isNumber()
true
if the value of the Splittable is numeric.boolean isReified(java.lang.String key)
true
if setReified(String, Object)
has been called
with the given key.boolean isString()
asString()
can be expected to return a
meaningful value.boolean isUndefined(java.lang.String key)
true
if the value of the key is undefined.void removeReified(java.lang.String key)
key
- the key for the value to be removedvoid setReified(java.lang.String key, java.lang.Object object)
void setSize(int i)
int size()