@NotThreadSafe final class BasicArray extends Object implements Array
Array
.Array.Entry
Modifier and Type | Field and Description |
---|---|
private static BiFunction<Integer,Value,Array.Entry> |
CONVERT_PAIR_TO_ENTRY |
private List<Value> |
values |
Constructor and Description |
---|
BasicArray() |
BasicArray(List<Value> values) |
BasicArray(Value[] values) |
Modifier and Type | Method and Description |
---|---|
Array |
add(Value value)
Adds the value to the end of this array.
|
Array |
clone()
Obtain a complete copy of this array.
|
int |
compareTo(Array that) |
boolean |
equals(Object obj) |
Array |
expand(int desiredSize,
Value value)
If the current size of the array is smaller than the given size, expand it and use the supplied value for all new entries.
|
Value |
get(int index)
Gets the value in this array at the given index.
|
boolean |
has(int index)
Determine if this contains an entry at the given index.
|
int |
hashCode() |
Array |
increment(int index,
Value increment)
Increment the numeric value at the given location by the designated amount.
|
protected int |
indexFrom(CharSequence name) |
boolean |
isEmpty()
Return whether this document contains no fields and is therefore empty.
|
protected boolean |
isValidIndex(int index) |
Iterator<Array.Entry> |
iterator() |
Value |
remove(int index)
Remove the specified entry from this array
|
Array |
removeAll()
Remove all entries from this array.
|
Array |
setValue(int index,
Value value)
Set the value for the field with the given name to be a value.
|
int |
size()
Return the number of name-value fields in this object.
|
String |
toString() |
Iterable<Value> |
values() |
finalize, getClass, notify, notifyAll, wait, wait, wait
add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, addAll, addAll, addAll, addAll, addNull, create, create, create, create, create, create, createWithNulls, expand, expand, expand, expand, expand, expand, expand, get, increment, increment, increment, increment, isNull, isNullOrMissing, putAll, setArray, setArray, setArray, setBinary, setBoolean, setDocument, setDocument, setNull, setNumber, setNumber, setNumber, setNumber, setNumber, setNumber, setString, streamEntries, streamValues, transform
forEach, spliterator
private static final BiFunction<Integer,Value,Array.Entry> CONVERT_PAIR_TO_ENTRY
BasicArray()
BasicArray(Value[] values)
protected final int indexFrom(CharSequence name)
protected final boolean isValidIndex(int index)
public int size()
Array
public boolean isEmpty()
Array
public int compareTo(Array that)
compareTo
in interface Comparable<Array>
public Iterator<Array.Entry> iterator()
iterator
in interface Iterable<Array.Entry>
public Value remove(int index)
Array
public Array removeAll()
Array
public boolean has(int index)
Array
public Value get(int index)
Array
public Array setValue(int index, Value value)
Array
public Array expand(int desiredSize, Value value)
Array
desiredSize
.public Array increment(int index, Value increment)
Array
public Array add(Value value)
Array
public Array clone()
Array
Copyright © 2016 JBoss by Red Hat. All rights reserved.