|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
java.util.ArrayList
org.apache.jdo.impl.sco.ArrayList
A mutable 2nd class object that represents ArrayList.
ArrayList,
Serialized Form| Nested Class Summary |
| Nested classes inherited from class java.util.AbstractList |
|
| Field Summary | |
private static java.lang.String |
_ArrayList
|
private java.util.Vector |
added
|
private boolean |
allowNulls
|
private java.lang.Class |
elementType
|
private int |
fieldNumber
|
private static org.apache.jdo.util.I18NHelper |
msg
I18N message handler |
private StateManagerInternal |
owner
|
private java.util.Vector |
removed
|
| Fields inherited from class java.util.ArrayList |
|
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
ArrayList(java.lang.Class elementType,
boolean allowNulls)
Constructs an empty ArrayList object. |
|
ArrayList(java.lang.Class elementType,
boolean allowNulls,
int initialCapacity)
Constructs an empty ArrayList object that the specified
initial capacity. |
|
| Method Summary | |
void |
add(int index,
java.lang.Object element)
Inserts the specified element at the specified position in this ArrayList. |
boolean |
add(java.lang.Object o)
Appends the specified element to the end of this ArrayList. |
boolean |
addAll(java.util.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,
java.util.Collection c)
Inserts all of the elements in in the specified Collection into this ArrayList at the specified position. |
void |
addAllInternal(java.util.Collection c)
Adds objects of the given Collection to this Collection without recording the event. |
void |
addInternal(java.lang.Object o)
Adds object to the Collection without recording the event. |
boolean |
allowNulls()
Returns whether nulls are permitted as elements. |
void |
clear()
Removes all of the elements from this ArrayList. |
void |
clearInternal()
Clears Collection without recording the event. |
java.lang.Object |
clone()
Creates and returns a copy of this object. |
java.util.Iterator |
eitherIterator()
Get an iterator regardless of whether the collection is frozen. |
java.util.Iterator |
frozenIterator()
Get an iterator over the frozen elements of this collection. |
java.util.Collection |
getAdded()
Returns the Collection of added elements |
java.lang.Class |
getElementType()
Returns the element type assignment compatible with all added elements of this collection. |
java.lang.String |
getFieldName()
Returns the field name |
java.lang.Object |
getOwner()
Returns the owner object of the SCO instance |
java.util.Collection |
getRemoved()
Returns the Collection of removed elements |
private void |
makeDirty()
Marks object dirty |
java.lang.Object |
remove(int index)
Removes the element at the specified position in this ArrayList. |
boolean |
remove(java.lang.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(java.util.Collection c)
Removes from this ArrayList all of its elements that are contained in the specified Collection. |
void |
removeInternal(java.lang.Object o)
Removes element from the Collection without recording the event. |
void |
reset()
Resets removed and added lists after flush |
boolean |
retainAll(java.util.Collection c)
Retains only the elements in this ArrayList that are contained in the specified Collection. |
java.lang.Object |
set(int index,
java.lang.Object element)
Replaces the element at the specified position in this ArrayList with the specified element. |
void |
setFrozen(java.lang.Object[] elements)
Set the contents of this Collection from the frozen elements. |
void |
setOwner(java.lang.Object owner,
int fieldNumber)
Sets the owner and field number. |
private void |
trackUpdates(boolean modified)
Apply changes |
void |
unsetOwner(java.lang.Object owner,
int fieldNumber)
Nullifies references to the owner Object iff the passed in owner and fieldNumber match. |
| Methods inherited from class java.util.ArrayList |
contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, removeRange, size, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
equals, hashCode, iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
containsAll, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Collection |
contains, containsAll, equals, hashCode, isEmpty, iterator, size, toArray, toArray |
| Methods inherited from interface java.util.List |
containsAll, equals, hashCode, iterator, listIterator, listIterator, subList |
| Field Detail |
private transient StateManagerInternal owner
private transient int fieldNumber
private transient java.lang.Class elementType
private transient boolean allowNulls
private transient java.util.Vector added
private transient java.util.Vector removed
private static final org.apache.jdo.util.I18NHelper msg
private static final java.lang.String _ArrayList
| Constructor Detail |
public ArrayList(java.lang.Class elementType,
boolean allowNulls)
ArrayList object.
elementType - the element types allowedallowNulls - true if nulls are allowed
public ArrayList(java.lang.Class elementType,
boolean allowNulls,
int initialCapacity)
ArrayList object that the specified
initial capacity.
elementType - the element types allowedallowNulls - true if nulls are allowedinitialCapacity - the initial capacity of the list.
java.lang.IllegalArgumentException - if the specified initial capacity
is negative| Method Detail |
public java.lang.Object set(int index,
java.lang.Object element)
set in interface java.util.Listindex - index of element to replace.element - element to be stored at the specified position.
java.lang.IndexOutOfBoundsException - index out of range
(index < 0 || index >= size()).
java.lang.IllegalArgumentException - fromIndex > toIndex.ArrayListpublic boolean add(java.lang.Object o)
add in interface java.util.Collectiono - element to be appended to this ArrayList.
ArrayListpublic boolean remove(java.lang.Object o)
remove in interface java.util.Collectiono - element to be removed from this ArrayList, if present.
ArrayList
public void add(int index,
java.lang.Object element)
add in interface java.util.Listindex - index at which the specified element is to be inserted.element - element to be inserted.
java.lang.IndexOutOfBoundsException - index is out of range
(index < 0 || index > size()).ArrayListpublic java.lang.Object remove(int index)
remove in interface java.util.Listindex - the index of the element to removed.
java.lang.IndexOutOfBoundsException - index out of range (index
< 0 || index >= size()).ArrayListpublic void clear()
clear in interface java.util.CollectionArrayListpublic boolean addAll(java.util.Collection c)
addAll in interface java.util.Collectionc - elements to be inserted into this ArrayList.
java.lang.IndexOutOfBoundsException - index out of range (index
< 0 || index > size()).ArrayListpublic boolean removeAll(java.util.Collection c)
removeAll in interface java.util.CollectionArrayList
public boolean addAll(int index,
java.util.Collection c)
addAll in interface java.util.Listindex - index at which to insert first element
from the specified collection.c - elements to be inserted into this ArrayList.
java.lang.IndexOutOfBoundsException - index out of range (index
< 0 || index > size()).ArrayListpublic boolean retainAll(java.util.Collection c)
retainAll in interface java.util.CollectionArrayListpublic java.lang.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.
clone in interface SCOpublic void reset()
SCOCollection
reset in interface SCOCollectionSCOCollection.reset()public void addInternal(java.lang.Object o)
SCOCollection
addInternal in interface SCOCollectionSCOCollection.addInternal(Object o)public void addAllInternal(java.util.Collection c)
SCOCollection
addAllInternal in interface SCOCollectionSCOCollection.addAllInternal(Collection c)public java.util.Collection getAdded()
SCOCollection
getAdded in interface SCOCollectionSCOCollection.getAdded()public java.util.Collection getRemoved()
SCOCollection
getRemoved in interface SCOCollectionSCOCollection.getRemoved()public void clearInternal()
SCOCollection
clearInternal in interface SCOCollectionSCOCollection.clearInternal()public void removeInternal(java.lang.Object o)
SCOCollection
removeInternal in interface SCOCollectionSCOCollection.removeInternal(Object o)
public void unsetOwner(java.lang.Object owner,
int fieldNumber)
SCO
unsetOwner in interface SCOowner - the existing owner object.fieldNumber - the existing number of the field.SCO.unsetOwner(Object owner, int fieldNumber)private void makeDirty()
private void trackUpdates(boolean modified)
modified - true if content of this list has been changed.
public void setOwner(java.lang.Object owner,
int fieldNumber)
SCO
setOwner in interface SCOowner - the owner object.fieldNumber - the number of the field associated with this instance.(Object owner, int fieldNumber)public java.lang.Object getOwner()
SCO
getOwner in interface SCO()public java.lang.String getFieldName()
SCO
getFieldName in interface SCOSCO.getFieldName()public java.lang.Class getElementType()
SCOCollection
getElementType in interface SCOCollection{public boolean allowNulls()
SCOCollection
allowNulls in interface SCOCollection{public java.util.Iterator frozenIterator()
frozenIterator in interface SCOCollectionpublic void setFrozen(java.lang.Object[] elements)
setFrozen in interface SCOCollectionelements - not used.public java.util.Iterator eitherIterator()
eitherIterator in interface SCOCollection
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||