public class LinkedList extends java.util.LinkedList implements SCOCollection
LinkedList,
Serialized Form| Constructor and Description |
|---|
LinkedList(java.lang.Class elementType,
boolean allowNulls)
Constructs an empty
LinkedList object. |
LinkedList(java.lang.Class elementType,
boolean allowNulls,
int initialCapacity)
Constructs an empty
LinkedList object that the specified
initial capacity which is ignored. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
java.lang.Object element)
Inserts the specified element at the specified position in this
LinkedList.
|
boolean |
add(java.lang.Object o)
Appends the specified element to the end of this LinkedList.
|
boolean |
addAll(java.util.Collection c)
Appends all of the elements in the specified Collection to the end of
this LinkedList, 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
LinkedList at the specified position.
|
void |
addAllInternal(java.util.Collection c)
Adds objects of the given Collection to this Collection without recording
the event.
|
void |
addFirst(java.lang.Object o)
Inserts the given element at the beginning of this list.
|
void |
addInternal(java.lang.Object o)
Adds object to the Collection without recording
the event.
|
void |
addLast(java.lang.Object o)
Appends the given element to the end of this list.
|
boolean |
allowNulls()
Returns whether nulls are permitted as elements.
|
void |
clear()
Removes all of the elements from this LinkedList.
|
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
|
java.lang.Object |
remove(int index)
Removes the element at the specified position in this LinkedList.
|
boolean |
remove(java.lang.Object o)
Removes the first occurrence of the specified element in this LinkedList
If the LinkedList does not contain the element, it is unchanged.
|
boolean |
removeAll(java.util.Collection c)
Removes from this LinkedList all of its elements that are contained in the
specified Collection.
|
java.lang.Object |
removeFirst()
Removes and returns the first element from this list.
|
void |
removeInternal(java.lang.Object o)
Removes element from the Collection without recording
the event.
|
java.lang.Object |
removeLast()
Removes and returns the last element from this list.
|
void |
reset()
Resets removed and added lists after flush
|
boolean |
retainAll(java.util.Collection c)
Retains only the elements in this LinkedList 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
LinkedList 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.
|
void |
unsetOwner(java.lang.Object owner,
int fieldNumber)
Nullifies references to the owner Object iff the passed in owner and
fieldNumber match.
|
contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, removeFirstOccurrence, removeLastOccurrence, size, toArray, toArrayequals, hashCode, listIterator, removeRange, subListfinalize, getClass, notify, notifyAll, wait, wait, waitcontains, containsAll, equals, hashCode, isEmpty, iterator, size, toArray, toArraypublic LinkedList(java.lang.Class elementType,
boolean allowNulls)
LinkedList object.elementType - the element types allowedallowNulls - true if nulls are allowedpublic LinkedList(java.lang.Class elementType,
boolean allowNulls,
int initialCapacity)
LinkedList object that the specified
initial capacity which is ignored.elementType - the element types allowedallowNulls - true if nulls are allowedinitialCapacity - the initial capacity of the list (ignored).java.lang.IllegalArgumentException - if the specified initial capacity
is negativepublic java.lang.Object set(int index,
java.lang.Object element)
set in interface java.util.Listset in class java.util.LinkedListindex - 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.LinkedListpublic boolean add(java.lang.Object o)
add in interface java.util.Collectionadd in interface java.util.Dequeadd in interface java.util.Listadd in interface java.util.Queueadd in class java.util.LinkedListo - element to be appended to this LinkedList.LinkedListpublic void addFirst(java.lang.Object o)
addFirst in interface java.util.DequeaddFirst in class java.util.LinkedListo - the element to be inserted at the beginning of this list.public void addLast(java.lang.Object o)
addLast in interface java.util.DequeaddLast in class java.util.LinkedListo - the element to be inserted at the end of this list.public boolean remove(java.lang.Object o)
remove in interface java.util.Collectionremove in interface java.util.Dequeremove in interface java.util.Listremove in class java.util.LinkedListo - element to be removed from this LinkedList, if present.LinkedListpublic java.lang.Object removeFirst()
removeFirst in interface java.util.DequeremoveFirst in class java.util.LinkedListNoSuchElementException - if this list is empty.public java.lang.Object removeLast()
removeLast in interface java.util.DequeremoveLast in class java.util.LinkedListNoSuchElementException - if this list is empty.public void add(int index,
java.lang.Object element)
add in interface java.util.Listadd in class java.util.LinkedListindex - 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()).LinkedListpublic java.lang.Object remove(int index)
remove in interface java.util.Listremove in class java.util.LinkedListindex - the index of the element to removed.java.lang.IndexOutOfBoundsException - index out of range (index
< 0 || index >= size()).LinkedListpublic void clear()
clear in interface java.util.Collectionclear in interface java.util.Listclear in class java.util.LinkedListLinkedListpublic boolean addAll(java.util.Collection c)
addAll in interface java.util.CollectionaddAll in interface java.util.ListaddAll in class java.util.LinkedListc - elements to be inserted into this LinkedList.java.lang.IndexOutOfBoundsException - index out of range (index
< 0 || index > size()).LinkedListpublic boolean removeAll(java.util.Collection c)
removeAll in interface java.util.CollectionremoveAll in interface java.util.ListremoveAll in class java.util.AbstractCollectionLinkedListpublic boolean addAll(int index,
java.util.Collection c)
addAll in interface java.util.ListaddAll in class java.util.LinkedListindex - index at which to insert first element
from the specified collection.c - elements to be inserted into this LinkedList.java.lang.IndexOutOfBoundsException - index out of range (index
< 0 || index > size()).LinkedListpublic boolean retainAll(java.util.Collection c)
retainAll in interface java.util.CollectionretainAll in interface java.util.ListretainAll in class java.util.AbstractCollectionLinkedListpublic 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.
public void reset()
SCOCollectionreset in interface SCOCollectionSCOCollection.reset()public void addInternal(java.lang.Object o)
SCOCollectionaddInternal in interface SCOCollectionSCOCollection.addInternal(Object o)public void addAllInternal(java.util.Collection c)
SCOCollectionaddAllInternal in interface SCOCollectionSCOCollection.addAllInternal(Collection c)public java.util.Collection getAdded()
SCOCollectiongetAdded in interface SCOCollectionSCOCollection.getAdded()public java.util.Collection getRemoved()
SCOCollectiongetRemoved in interface SCOCollectionSCOCollection.getRemoved()public void clearInternal()
SCOCollectionclearInternal in interface SCOCollectionSCOCollection.clearInternal()public void removeInternal(java.lang.Object o)
SCOCollectionremoveInternal in interface SCOCollectionSCOCollection.removeInternal(Object o)public void unsetOwner(java.lang.Object owner,
int fieldNumber)
SCOunsetOwner in interface SCOowner - the existing owner object.fieldNumber - the existing number of the field.SCO.unsetOwner(Object owner, int fieldNumber)public void setOwner(java.lang.Object owner,
int fieldNumber)
SCOsetOwner 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()
SCOpublic java.lang.String getFieldName()
SCOgetFieldName in interface SCOSCO.getFieldName()public java.lang.Class getElementType()
SCOCollectiongetElementType in interface SCOCollection{public boolean allowNulls()
SCOCollectionallowNulls 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 SCOCollectionCopyright © 2005-2012 Apache Software Foundation. All Rights Reserved.