org.garret.perst
Class L2ListElem

java.lang.Object
  extended byorg.garret.perst.Persistent
      extended byorg.garret.perst.PersistentResource
          extended byorg.garret.perst.L2ListElem
All Implemented Interfaces:
java.io.Externalizable, IPersistent, IResource, java.io.Serializable
Direct Known Subclasses:
L2List

public class L2ListElem
extends PersistentResource

Double linked list element.

See Also:
Serialized Form

Constructor Summary
L2ListElem()
           
 
Method Summary
 L2ListElem getNext()
          Get next list element.
 L2ListElem getPrev()
          Get previous list element.
 void linkAfter(L2ListElem elem)
          Link specified element in the list after this element
 void linkBefore(L2ListElem elem)
          Link specified element in the list before this element
 void prune()
          Make list empty.
 void unlink()
          Remove element from the list
 
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
 

Constructor Detail

L2ListElem

public L2ListElem()
Method Detail

getNext

public L2ListElem getNext()
Get next list element. Been call for the last list element, this method will return first element of the list or list header


getPrev

public L2ListElem getPrev()
Get previous list element. Been call for the first list element, this method will return last element of the list or list header


linkAfter

public void linkAfter(L2ListElem elem)
Link specified element in the list after this element

Parameters:
elem - element to be linked in the list after this elemen

linkBefore

public void linkBefore(L2ListElem elem)
Link specified element in the list before this element

Parameters:
elem - element to be linked in the list before this elemen

prune

public void prune()
Make list empty. This method should be applied to list header.


unlink

public void unlink()
Remove element from the list