public class RavenJArray extends RavenJToken implements Iterable<RavenJToken>
Constructor and Description |
---|
RavenJArray()
Initializes a new instance of the
RavenJArray class. |
RavenJArray(Collection<?> content) |
RavenJArray(RavenJToken... content)
Initializes a new instance of the
RavenJArray class with the specified content. |
Modifier and Type | Method and Description |
---|---|
void |
add(RavenJToken token) |
protected void |
addForCloning(String key,
RavenJToken token) |
RavenJArray |
cloneToken()
Clones this object
|
RavenJArray |
createSnapshot() |
void |
ensureCannotBeChangeAndEnableShapshotting() |
RavenJToken |
get(int index)
Gets the
RavenJToken at the specified index. |
JTokenType |
getType()
Gets the node type for this
RavenJArray |
void |
insert(int index,
RavenJToken item)
Inserts an item to the
List at the specified index. |
boolean |
isSnapshot() |
Iterator<RavenJToken> |
iterator() |
static RavenJArray |
load(org.codehaus.jackson.JsonParser parser) |
static RavenJArray |
parse(String json)
Load a
RavenJArray from a string that contains JSON. |
boolean |
remove(RavenJToken token) |
void |
removeAt(int index) |
void |
set(int index,
RavenJToken value)
Sets the
RavenJToken at the specified index. |
int |
size() |
Iterable<RavenJToken> |
values() |
<T> List<T> |
values(Class<T> clazz) |
void |
writeTo(org.codehaus.jackson.JsonGenerator writer) |
cloneTokenImpl, deepEquals, deepEquals, deepEquals, deepEquals, deepHashCode, deepHashCode, equals, fromObject, fromObjectInternal, hashCode, readFrom, selectToken, selectToken, selectToken, selectToken, selectToken, selectToken, selectTokenWithRavenSyntaxReturningFlatStructure, selectTokenWithRavenSyntaxReturningSingleValue, toString, toString, tryLoad, value, value
public RavenJArray()
RavenJArray
class.public RavenJArray(Collection<?> content)
public RavenJArray(RavenJToken... content)
RavenJArray
class with the specified content.content
- The contents of the array;public JTokenType getType()
RavenJArray
getType
in class RavenJToken
public RavenJToken get(int index)
RavenJToken
at the specified index.index
- public void set(int index, RavenJToken value)
RavenJToken
at the specified index.index
- value
- public RavenJArray cloneToken()
RavenJToken
cloneToken
in class RavenJToken
RavenJToken
public boolean isSnapshot()
isSnapshot
in class RavenJToken
public int size()
public static RavenJArray load(org.codehaus.jackson.JsonParser parser)
public static RavenJArray parse(String json)
RavenJArray
from a string that contains JSON.json
- A String
that contains JSON.RavenJArray
populated from the string that contains JSON.public Iterator<RavenJToken> iterator()
iterator
in interface Iterable<RavenJToken>
public void add(RavenJToken token)
public boolean remove(RavenJToken token)
public void removeAt(int index)
public void insert(int index, RavenJToken item)
List
at the specified index.index
- The zero-based index sat which item should be inserteditem
- The object to insert into the list.public void ensureCannotBeChangeAndEnableShapshotting()
ensureCannotBeChangeAndEnableShapshotting
in class RavenJToken
public RavenJArray createSnapshot()
createSnapshot
in class RavenJToken
public void writeTo(org.codehaus.jackson.JsonGenerator writer)
writeTo
in class RavenJToken
protected void addForCloning(String key, RavenJToken token)
addForCloning
in class RavenJToken
public Iterable<RavenJToken> values()
values
in class RavenJToken
public <T> List<T> values(Class<T> clazz)
values
in class RavenJToken
Copyright © 2016. All Rights Reserved.