|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectorg.garret.perst.Persistent
org.garret.perst.PersistentResource
org.garret.perst.L2ListElem
org.garret.perst.L2List
Double linked list.
| Constructor Summary | |
|---|---|
L2List()
|
|
| Method Summary | |
|---|---|
boolean |
add(java.lang.Object obj)
Add object to the list |
boolean |
addAll(java.util.Collection c)
Adds all of the elements in the specified collection to this collection (optional operation). |
void |
append(L2ListElem elem)
Insert element at the end of the list |
void |
clear()
Make list empty. |
boolean |
contains(java.lang.Object o)
Check if object is in collection |
boolean |
containsAll(java.util.Collection c)
Returns true if this collection contains all of the elements in the specified collection. |
L2ListElem |
head()
Get list head element |
boolean |
isEmpty()
Check if list is empty |
java.util.Iterator |
iterator()
Get list iterator. |
void |
prepend(L2ListElem elem)
Insert element at the beginning of the list |
void |
remove(L2ListElem elem)
Remove element from the list |
boolean |
remove(java.lang.Object o)
Remove object from the list |
boolean |
removeAll(java.util.Collection c)
Removes from this collection all of its elements that are contained in the specified collection (optional operation). |
boolean |
retainAll(java.util.Collection c)
Retains only the elements in this collection that are contained in the specified collection (optional operation). |
java.util.Iterator |
select(java.lang.Class cls,
java.lang.String predicate)
Select members of the collection using search predicate This iterator doesn't support remove() method. |
int |
size()
Get size of the list |
L2ListElem |
tail()
Get list tail element |
java.lang.Object[] |
toArray()
Get array of the list elements |
java.lang.Object[] |
toArray(java.lang.Object[] a)
Returns an array containing all of the elements in this list in the correct order; the runtime type of the returned array is that of the specified array. |
| Methods inherited from class org.garret.perst.L2ListElem |
|---|
getNext, getPrev, linkAfter, linkBefore, prune, unlink |
| Methods inherited from class org.garret.perst.PersistentResource |
|---|
exclusiveLock, exclusiveLock, reset, sharedLock, sharedLock, unlock |
| Methods inherited from class org.garret.perst.Persistent |
|---|
assignOid, deallocate, equals, getOid, getStorage, hashCode, invalidate, isDeleted, isModified, isPersistent, isRaw, load, loadAndModify, makePersistent, modify, onLoad, onStore, readExternal, recursiveLoading, store, writeExternal |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Collection |
|---|
add, addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray |
| Constructor Detail |
|---|
public L2List()
| Method Detail |
|---|
public boolean add(java.lang.Object obj)
obj - object added to the list
truepublic boolean addAll(java.util.Collection c)
This implementation iterates over the specified collection, and adds each object returned by the iterator to this collection, in turn.
Note that this implementation will throw an UnsupportedOperationException unless add is overridden (assuming the specified collection is non-empty).
c - collection whose elements are to be added to this collection.
java.lang.UnsupportedOperationException - if this collection does not
support the addAll method.
java.lang.NullPointerException - if the specified collection is null.add(Object)public void append(L2ListElem elem)
public void clear()
clear in interface java.util.Collectionpublic boolean contains(java.lang.Object o)
contains in interface java.util.Collectiono - object to be searched in the collection
true if there is an object in the collection which
is equals to the specified objectpublic boolean containsAll(java.util.Collection c)
This implementation iterates over the specified collection, checking each element returned by the iterator in turn to see if it's contained in this collection. If all elements are so contained true is returned, otherwise false.
c - collection to be checked for containment in this collection.
java.lang.NullPointerException - if the specified collection is null.contains(Object)public L2ListElem head()
public boolean isEmpty()
isEmpty in interface java.util.Collectiontrue if list is emptypublic java.util.Iterator iterator()
iterator in interface java.util.Collectionpublic void prepend(L2ListElem elem)
public void remove(L2ListElem elem)
public boolean remove(java.lang.Object o)
remove in interface java.util.Collectiono - object to be removed from the list
truepublic boolean removeAll(java.util.Collection c)
This implementation iterates over this collection, checking each element returned by the iterator in turn to see if it's contained in the specified collection. If it's so contained, it's removed from this collection with the iterator's remove method.
Note that this implementation will throw an UnsupportedOperationException if the iterator returned by the iterator method does not implement the remove method and this collection contains one or more elements in common with the specified collection.
c - elements to be removed from this collection.
java.lang.UnsupportedOperationException - if the removeAll method
is not supported by this collection.
java.lang.NullPointerException - if the specified collection is null.remove(Object),
contains(Object)public boolean retainAll(java.util.Collection c)
This implementation iterates over this collection, checking each element returned by the iterator in turn to see if it's contained in the specified collection. If it's not so contained, it's removed from this collection with the iterator's remove method.
Note that this implementation will throw an UnsupportedOperationException if the iterator returned by the iterator method does not implement the remove method and this collection contains one or more elements not present in the specified collection.
c - elements to be retained in this collection.
java.lang.UnsupportedOperationException - if the retainAll method
is not supported by this Collection.
java.lang.NullPointerException - if the specified collection is null.remove(Object),
contains(Object)
public java.util.Iterator select(java.lang.Class cls,
java.lang.String predicate)
select in interface ITablecls - class of index memberspredicate - JSQL condition
public int size()
size in interface java.util.Collectionpublic L2ListElem tail()
public java.lang.Object[] toArray()
toArray in interface java.util.Collectionpublic java.lang.Object[] toArray(java.lang.Object[] a)
If the list fits in the specified array with room to spare (i.e., the array has more elements than the list), the element in the array immediately following the end of the collection is set to null. This is useful in determining the length of the list only if the caller knows that the list does not contain any null elements.
a - the array into which the elements of the list are to
be stored, if it is big enough; otherwise, a new array of the
same runtime type is allocated for this purpose.
java.lang.ArrayStoreException - if the runtime type of a is not a supertype
of the runtime type of every element in this list.
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||