public final class MutableArrayValue extends java.lang.Object implements ArrayValue, java.lang.Cloneable
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
java.lang.Object element) |
boolean |
add(java.lang.Object e) |
boolean |
addAll(java.util.Collection c) |
boolean |
addAll(int index,
java.util.Collection c) |
void |
clear() |
java.lang.Object |
clone() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection c) |
static MutableArrayValue |
create(DBObject obj,
DBField field,
StoredArrayValue store,
DBObjectHelper helper)
find
|
java.lang.Object |
get(int pos)
get the array value
|
DBField |
getField()
get the field.
|
MutableArrayValueData |
getMutableArrayValueData()
the current data
|
int |
getOriginalSeq(int pos)
get the original sequence number.
|
java.lang.Object[][] |
getSegment(int pos)
get the segment values
|
int |
getStartSeq(int pos)
get the sequence number
|
ArrayValue |
getStore()
the store
|
int |
indexOf(java.lang.Object o) |
boolean |
isDirty()
is dirty ?
|
boolean |
isEmpty() |
boolean |
isSaved()
is saved ?
|
java.util.Iterator |
iterator() |
int |
lastIndexOf(java.lang.Object o) |
static MutableArrayValue[] |
list(DBObject obj)
list all the arrays for an object
|
java.util.ListIterator |
listIterator() |
java.util.ListIterator |
listIterator(int index) |
static java.lang.String |
makeString(java.lang.Object[] list)
make a string
|
static void |
markAllAsSaved(DBObject obj)
mark all as saved for this object
|
void |
parse(java.lang.Object data)
parse
|
java.lang.Object |
rawGet(int pos)
get the array value
|
java.lang.Object |
remove(int index) |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection c) |
boolean |
retainAll(java.util.Collection c) |
java.lang.Object |
set(int pos,
java.lang.Object inValue) |
void |
setSavePointHelper(DBObject obj,
DBField field,
DBObjectHelper helper,
DBObjectHelper copyFromHelper)
set the current save point
|
void |
setStartSeq(int pos,
int seq) |
void |
setStore(StoredArrayValue store)
set the store
|
int |
size()
The size
|
java.util.List |
subList(int fromIndex,
int toIndex) |
java.lang.Object[] |
toArray() |
java.lang.Object[] |
toArray(java.lang.Object[] array) |
java.lang.String |
toString()
to String
|
@CheckReturnValue @Nonnull public MutableArrayValueData getMutableArrayValueData()
@CheckReturnValue public boolean isSaved()
@CheckReturnValue public boolean isDirty()
public void setStore(@Nullable StoredArrayValue store)
store
- the array store@CheckReturnValue @Nullable public ArrayValue getStore()
@CheckReturnValue @Nonnull public DBField getField()
@CheckReturnValue @Nonnull public static MutableArrayValue[] list(DBObject obj)
obj
- the object@CheckReturnValue @Nonnull public static MutableArrayValue create(DBObject obj, DBField field, StoredArrayValue store, DBObjectHelper helper)
obj
- the objectfield
- the fieldstore
- the storehelper
- the helperpublic void setSavePointHelper(DBObject obj, DBField field, DBObjectHelper helper, DBObjectHelper copyFromHelper)
obj
- the objectfield
- the fieldhelper
- the helpercopyFromHelper
- copy frompublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
@Nullable @CheckReturnValue public java.lang.Object[][] getSegment(@Nonnegative int pos)
pos
- the position to getpublic void setStartSeq(@Nonnegative int pos, @Nonnegative int seq)
pos
- the positionseq
- the sequence@CheckReturnValue @Nonnegative public int getStartSeq(@Nonnegative int pos)
pos
- the position@CheckReturnValue @Nonnegative public int getOriginalSeq(@Nonnegative int pos)
pos
- the position to fetch.@CheckReturnValue @Nullable public java.lang.Object get(@Nonnegative int pos)
get
in interface ArrayValue
get
in interface java.util.List
pos
- the position to get@CheckReturnValue @Nullable public java.lang.Object rawGet(@Nonnegative int pos)
rawGet
in interface ArrayValue
pos
- the position to getpublic void parse(java.lang.Object data)
data
- the data@Nullable public java.lang.Object set(@Nonnegative int pos, @Nonnull java.lang.Object inValue)
set
in interface java.util.List
pos
- inValue
- public static void markAllAsSaved(@Nonnull DBObject obj)
obj
- mark all as saved.@CheckReturnValue @Nonnegative public int size()
size
in interface ArrayValue
size
in interface java.util.Collection
size
in interface java.util.List
@CheckReturnValue public boolean isEmpty()
isEmpty
in interface java.util.Collection
isEmpty
in interface java.util.List
@CheckReturnValue public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection
contains
in interface java.util.List
@CheckReturnValue public java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in interface java.util.List
@CheckReturnValue @Nonnull public java.lang.Object[] toArray()
toArray
in interface java.util.Collection
toArray
in interface java.util.List
@CheckReturnValue @Nonnull public java.lang.String toString()
toString
in class java.lang.Object
@CheckReturnValue @Nonnull public static java.lang.String makeString(java.lang.Object[] list)
list
- the list to makepublic boolean add(@Nonnull java.lang.Object e)
add
in interface java.util.Collection
add
in interface java.util.List
public boolean remove(@Nonnull java.lang.Object o)
remove
in interface java.util.Collection
remove
in interface java.util.List
public boolean containsAll(java.util.Collection c)
containsAll
in interface java.util.Collection
containsAll
in interface java.util.List
public boolean addAll(java.util.Collection c)
addAll
in interface java.util.Collection
addAll
in interface java.util.List
public boolean addAll(@Nonnegative int index, java.util.Collection c)
addAll
in interface java.util.List
public boolean removeAll(@Nonnull java.util.Collection c)
removeAll
in interface java.util.Collection
removeAll
in interface java.util.List
public boolean retainAll(@Nonnull java.util.Collection c)
retainAll
in interface java.util.Collection
retainAll
in interface java.util.List
public void clear()
clear
in interface java.util.Collection
clear
in interface java.util.List
public void add(@Nonnegative int index, @Nonnull java.lang.Object element)
add
in interface java.util.List
@Nullable public java.lang.Object remove(@Nonnegative int index)
remove
in interface java.util.List
@CheckReturnValue public int indexOf(java.lang.Object o)
indexOf
in interface java.util.List
@CheckReturnValue public int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List
@CheckReturnValue @Nonnull public java.util.ListIterator listIterator()
listIterator
in interface java.util.List
@CheckReturnValue @Nonnull public java.util.ListIterator listIterator(int index)
listIterator
in interface java.util.List
@CheckReturnValue @Nonnull public java.util.List subList(@Nonnegative int fromIndex, @Nonnegative int toIndex)
subList
in interface java.util.List
@CheckReturnValue @Nonnull public java.lang.Object[] toArray(@Nonnull java.lang.Object[] array)
toArray
in interface java.util.Collection
toArray
in interface java.util.List
array
- stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.