public class ArrayList extends ArrayList implements SCOCollection
ArrayList,
Serialized FormmodCount| Constructor and Description |
|---|
ArrayList(Object owner,
String fieldName,
Class elementType,
boolean allowNulls)
Constructs an empty vector so that its internal data array
has size 10 and its standard capacity increment is
zero.
|
ArrayList(Object owner,
String fieldName,
Class elementType,
boolean allowNulls,
int initialCapacity)
Constructs an empty vector with the specified initial capacity and
with its capacity increment equal to zero.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
Object element)
Inserts the specified element at the specified position in this ArrayList.
|
boolean |
add(Object o)
Appends the specified element to the end of this ArrayList.
|
boolean |
addAll(Collection c)
Appends all of the elements in the specified Collection to the end of
this ArrayList, in the order that they are returned by the specified
Collection's Iterator.
|
boolean |
addAll(int index,
Collection c)
Inserts all of the elements in in the specified Collection into this
ArrayList at the specified position.
|
void |
addAllInternal(Collection c)
Adds a Collection to the list without recording changes
|
void |
addInternal(Object o)
Adds an object to the list without recording changes
|
void |
addToBaseCollection(Object o)
Adds an object to the list without recording changes.
|
void |
applyDeferredUpdates(Collection c) |
void |
applyUpdates(StateManager sm,
boolean modified)
Apply changes (can be a no-op)
|
void |
clear()
Removes all of the elements from this ArrayList.
|
void |
clearInternal()
Clears Collection without notifing the owner
|
Object |
clone()
Creates and returns a copy of this object.
|
Object |
cloneInternal()
Creates and returns a copy of this object without resetting the owner and field value.
|
Collection |
getAdded()
Returns added collection
|
String |
getFieldName()
Returns the field name
|
Object |
getOwner()
Returns the owner object of the SCO instance
|
Collection |
getRemoved()
Returns removed collection
|
boolean |
isDeferred() |
StateManager |
makeDirty()
Marks object dirty
|
void |
markDeferred() |
Object |
remove(int index)
Removes the element at the specified position in this ArrayList.
|
boolean |
remove(Object o)
Removes the first occurrence of the specified element in this ArrayList
If the ArrayList does not contain the element, it is unchanged.
|
boolean |
removeAll(Collection c)
Removes from this ArrayList all of its elements that are contained in the
specified Collection.
|
void |
removeAllInternal(Collection c)
Removes from this collection without recording changes
|
void |
removeInternal(Object o)
Removes an element without notifing the owner
|
void |
reset()
Cleans removed and added lists
|
boolean |
retainAll(Collection c)
Retains only the elements in this ArrayList that are contained in the
specified Collection.
|
Object |
set(int index,
Object element)
Replaces the element at the specified position in this ArrayList with the
specified element.
|
void |
setOwner(Object owner,
String fieldName,
Class elementType)
Set the owner if this instance is not owned.
|
void |
unsetOwner()
Nullifies references to the owner Object and Field
|
contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, removeIf, removeRange, replaceAll, size, sort, spliterator, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcontains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, removeIf, size, spliterator, stream, toArray, toArraycontainsAll, equals, hashCodepublic ArrayList(Object owner, String fieldName, Class elementType, boolean allowNulls)
owner - the owning objectfieldName - the owning field nameelementType - the element types allowedallowNulls - true if nulls are allowedpublic ArrayList(Object owner, String fieldName, Class elementType, boolean allowNulls, int initialCapacity)
owner - the owning objectfieldName - the owning field nameelementType - the element types allowedallowNulls - true if nulls are allowedinitialCapacity - the initial capacity of the vector.IllegalArgumentException - if the specified initial capacity
is negativepublic Object set(int index, Object element)
set in interface Listset in class ArrayListindex - index of element to replace.element - element to be stored at the specified position.IndexOutOfBoundsException - index out of range
(index < 0 || index >= size()).IllegalArgumentException - fromIndex > toIndex.ArrayListpublic boolean add(Object o)
public boolean remove(Object o)
public void add(int index,
Object element)
public Object remove(int index)
public void clear()
public boolean addAll(Collection c)
addAll in interface CollectionaddAll in interface ListaddAll in class ArrayListc - elements to be inserted into this ArrayList.IndexOutOfBoundsException - index out of range (index
< 0 || index > size()).ArrayListpublic boolean removeAll(Collection c)
public boolean addAll(int index,
Collection c)
addAll in interface ListaddAll in class ArrayListindex - index at which to insert first element
from the specified collection.c - elements to be inserted into this ArrayList.IndexOutOfBoundsException - index out of range (index
< 0 || index > size()).ArrayListpublic boolean retainAll(Collection c)
public Object clone()
Mutable Second Class Objects are required to provide a public clone method in order to allow for copying PersistenceCapable objects. In contrast to Object.clone(), this method must not throw a CloneNotSupportedException.
public Object cloneInternal()
cloneInternal in interface SCOpublic void reset()
reset in interface SCOCollectionpublic void markDeferred()
markDeferred in interface SCOCollectionpublic boolean isDeferred()
isDeferred in interface SCOCollectionpublic void applyDeferredUpdates(Collection c)
applyDeferredUpdates in interface SCOCollectionpublic void addInternal(Object o)
addInternal in interface SCOCollectionpublic void addAllInternal(Collection c)
addAllInternal in interface SCOCollectionpublic void addToBaseCollection(Object o)
SCOCollectionaddToBaseCollection in interface SCOCollectionpublic void removeAllInternal(Collection c)
removeAllInternal in interface SCOCollectionpublic Collection getAdded()
getAdded in interface SCOCollectionpublic Collection getRemoved()
getRemoved in interface SCOCollectionpublic void clearInternal()
clearInternal in interface SCOCollectionpublic void removeInternal(Object o)
removeInternal in interface SCOCollectionpublic void unsetOwner()
unsetOwner in interface SCOpublic Object getOwner()
public String getFieldName()
getFieldName in interface SCOpublic StateManager makeDirty()
public void applyUpdates(StateManager sm, boolean modified)
applyUpdates in interface SCOpublic void setOwner(Object owner, String fieldName, Class elementType)
setOwner in interface SCOCollectionowner - the new owner.fieldName - the new field name.elementType - the new element type as Class, or null if type
is not to be checked.SCOCollection.setOwner(java.lang.Object, java.lang.String, java.lang.Class)Copyright © 2017. All rights reserved.