|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.app.util.ScalableList.ListNode<E>
E - the type of element stored in the ScalableListstatic class ScalableList.ListNode<E>
Node which parents a SubList<E>. These nodes can be considered
as the leaf nodes of the tree and contain references to a portion of
the list. A ListNode's parent is always a TreeNode
since they are the deepest organizational element of the
ScalableList. ListNodes are arranged in a
doubly-linked list, each having a reference to its parent.
| Constructor Summary | |
|---|---|
ScalableList.ListNode(ScalableList.TreeNode<E> parent,
int maxSize)
Constructor which uses knowledge of a parent and maximum list size. |
|
ScalableList.ListNode(ScalableList.TreeNode<E> parent,
int maxSize,
E e)
Constructor which uses knowledge of a parent and maximum list size. |
|
ScalableList.ListNode(ScalableList.TreeNode<E> parent,
int maxSize,
List<ManagedReference<ManagedObject>> list)
Constructor which uses knowledge of a parent and maximum list size. |
|
| Method Summary | |
|---|---|
(package private) void |
append(E e)
Appends the supplied object to the list and performs a split if necessary. |
void |
clear()
Walks up the tree and removes the object and any of its parents. |
(package private) int |
getDataIntegrityValue()
Returns the data integrity value of the ListNode |
ScalableList.TreeNode<E> |
getParent()
Retrieves the parent of the ListNode |
(package private) ScalableList.SubList<E> |
getSubList()
Returns the SubList object which contains a subset of the
elements in the collection. |
(package private) void |
insert(int index,
E e)
Inserts the supplied value at the given index. |
ScalableList.ListNode<E> |
next()
Returns the next Node in sequence, or null if none exists. |
ScalableList.ListNode<E> |
prev()
Returns the previous Node in sequence, or null if none
exists. |
(package private) E |
remove(ScalableList<E> list,
int index)
Removes the object at the specified index of the sublist. |
(package private) boolean |
remove(ScalableList<E> list,
Object obj)
Removes the Object from the SubList<E>, if it
exists. |
com.sun.sgs.app.util.ScalableList.SearchResult<E> |
search(int currentValue,
int destIndex)
Traverses the tree (recursively) in search of the ListNode |
(package private) E |
set(int index,
Object obj)
Sets the element at the supplied index with the provided value. |
void |
setNext(ScalableList.Node<E> ref)
Sets the next element to be the supplied argument. |
void |
setParent(ScalableList.TreeNode<E> parent)
Sets the Node's parent to the supplied argument. |
void |
setPrev(ScalableList.Node<E> ref)
Sets the previous element to be the supplied argument. |
int |
size()
The size of the node; that is, the sum of the sizes of its immediate children. |
String |
toString()
A String representation of the ListNode. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
ScalableList.ListNode(ScalableList.TreeNode<E> parent,
int maxSize)
ListNode that exceeds maxSize will be subject to
splitting.
parent - the intended parentmaxSize - the maximum number of elements that can be stored
ScalableList.ListNode(ScalableList.TreeNode<E> parent,
int maxSize,
E e)
ListNode that exceeds maxSize will be subject to
splitting.
parent - the intended parentmaxSize - the maximum number of elements that can be storede - an element which is to be stored as the first item in the
list
ScalableList.ListNode(ScalableList.TreeNode<E> parent,
int maxSize,
List<ManagedReference<ManagedObject>> list)
ListNode that exceeds maxSize will be subject to
splitting.
parent - the intended parentmaxSize - the maximum number of elements that can be storedlist - a list of items which are to be added into the empty
list| Method Detail |
|---|
int getDataIntegrityValue()
ListNode
public void setNext(ScalableList.Node<E> ref)
setNext in interface ScalableList.Node<E>ref - the next Nodepublic void setParent(ScalableList.TreeNode<E> parent)
Node's parent to the supplied argument.
setParent in interface ScalableList.Node<E>public ScalableList.ListNode<E> next()
Node in sequence, or null if none exists.
next in interface ScalableList.Node<E>public void setPrev(ScalableList.Node<E> ref)
setPrev in interface ScalableList.Node<E>ref - the previous Nodepublic ScalableList.ListNode<E> prev()
Node in sequence, or null if none
exists.
prev in interface ScalableList.Node<E>public int size()
size in interface ScalableList.Node<E>ScalableList.SubList<E> getSubList()
SubList object which contains a subset of the
elements in the collection.
SubList containing list elements, or null if
one has not yet been instantiatedvoid append(E e)
e - the element to append
void insert(int index,
E e)
index - the index to insert the value, relative to the current
SubListe - the value to insert
E remove(ScalableList<E> list,
int index)
For example, if there are five ListNodes with a cluster size of
five, the item with an absolute index of 16 corresponds to an
element in the fourth ListNode
list - a reference to the ScalableList; this argument
should only ever be null during the AsynchronousClearTask
operationindex - the index corresponding to an element in the list (not
an absolute index with respect to the ScalableList object
public void clear()
AsynchronousClearTask operation.
clear in interface ScalableList.Node<E>public String toString()
String representation of the ListNode.
toString in class ObjectString representing the contents of the
ListNode
boolean remove(ScalableList<E> list,
Object obj)
Object from the SubList<E>, if it
exists.
list - a reference to the ScalableList; since this
method is not called by the AsynchronousClearTask, this
parameter must not be null.obj - the Object to remove
true if so,
false otherwise
E set(int index,
Object obj)
index - the index to set the valueobj - the value to replace the existing one
public ScalableList.TreeNode<E> getParent()
ListNode
getParent in interface ScalableList.Node<E>
public com.sun.sgs.app.util.ScalableList.SearchResult<E> search(int currentValue,
int destIndex)
search in interface ScalableList.Node<E>currentValue - the current index value at the beginning of
this current searchdestIndex - the absolute index of the desired element
ListNode containing the absolute
destIndex
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||