E - the set element type@StoreNotUseStandardSerialization @StorableClass public class LinkedTreeSupport<E> extends Object implements IListSupport<E>, ILinkedListSupportNodeManager<E>, Iterable<E>, Cloneable, Serializable
Object.equals(Object) and
 Object.hashCode() for access to element| Modifier | Constructor and Description | 
|---|---|
protected  | 
LinkedTreeSupport(boolean concurrentAccess)  | 
protected  | 
LinkedTreeSupport(Comparator<? super E> comparator,
                 boolean concurrentAccess)  | 
  | 
LinkedTreeSupport(IInstanceFactory instanceFactory,
                 boolean concurrentAccess)  | 
protected  | 
LinkedTreeSupport(IInstanceFactory instanceFactory,
                 Comparator<? super E> comparator,
                 boolean concurrentAccess)  | 
| Modifier and Type | Method and Description | 
|---|---|
E | 
add(int index,
   E element)
add element at index position 
 | 
E | 
addAtBegin(E element)  | 
E | 
addAtEnd(E element)
add element at end of the list 
 | 
E | 
addReplace(E element)
add element at end of the list if equals element not already in the list,
 else replace the equals element 
 | 
ILinkedListSupportNode<E> | 
addToTree(E element)  | 
void | 
addToTree(ILinkedListSupportNode<E> node)  | 
void | 
clear()
clear the list 
 | 
LinkedTreeSupport<E> | 
clone()  | 
E | 
closestGreaterOrEqual(E element)  | 
E | 
closestLessOrEqual(E element)  | 
boolean | 
contains(Object object)
to check if the set contains an element equals to a reference object 
equality check is done using Object.equals element implementation | 
void | 
decrementSize()  | 
ListIterator<E> | 
descendingIterator()
Returns an iterator over the elements in this list in reverse sequential
 order. 
 | 
boolean | 
equals(Object object)  | 
E | 
first()  | 
E | 
get(int index)  | 
E | 
get(Object object)
get object in the set equals to an object 
equality check is done using Object.equals element implementation | 
Comparator<? super E> | 
getComparatorForComparable()  | 
IEqualsHashComparator | 
getEqualsHashComparator()  | 
E | 
getFirst()
get the first element of the list 
null returned if empty list or if first element is null  | 
ILinkedListSupportNode<E> | 
getFirstNode()  | 
E | 
getLast()
get the last element of the list 
null returned if empty list or if last element is null  | 
ILinkedListSupportNode<E> | 
getLastNode()
get last node of the list, null for empty list 
package visibility, should be used only by LinkedListSupportIterator | 
LinkedListSupportManager<E> | 
getListManager()  | 
ILinkedListSupportNode<E> | 
getRoot()
get the root node, null for empty list 
should be used only by LinkedListSupportIterator and
 ILinkedListSupportNodeManager implementation | 
int | 
getSize()  | 
RedBlackTree<ILinkedListSupportNode<E>> | 
getTree()  | 
int | 
hashCode()  | 
void | 
incrementSize()  | 
int | 
indexOf(Object object)  | 
boolean | 
isEmpty()  | 
ListIterator<E> | 
iterator()
next will return the first element if list not empty 
no previous element  | 
ListIterator<E> | 
iterator(int index)
next will return element at index position 
 | 
E | 
last()  | 
int | 
lastIndexOf(Object object)  | 
boolean | 
moveDown(E element)  | 
boolean | 
moveToFirstPosition(E element)  | 
boolean | 
moveToLastPosition(E element)  | 
static LinkedTreeSupport | 
newInstance(IInstanceFactory instanceFactory,
           boolean concurrentAccess)  | 
static LinkedTreeSupport | 
newInstance(IInstanceFactory instanceFactory,
           Comparator comparator,
           boolean concurrentAccess)  | 
ILinkedListSupportNode<E> | 
newLinkedListNode()  | 
E | 
remove(int index)
remove element at index 
 | 
E | 
remove(Object object)
remove element from the set 
equality check is done using Object.equals element implementation | 
E | 
removeFirst()
remove first element of the list 
 | 
void | 
removeFromTree(E element)  | 
E | 
removeGreater()  | 
E | 
removeLast()
remove last element of the list 
 | 
void | 
removeListener()  | 
E | 
removeSmaller()  | 
void | 
resetSize()  | 
E | 
set(E element,
   int index)
add element at position 
 | 
void | 
setLastNode(ILinkedListSupportNode<E> lastNode)  | 
void | 
setListener(ISupportListener<E> listener)  | 
void | 
setListManager(LinkedListSupportManager<E> listManager)  | 
void | 
setRoot(ILinkedListSupportNode<E> rootNode)  | 
void | 
setSize(int size)  | 
void | 
setTree(TreeSupport<ILinkedListSupportNode<E>> tree)  | 
E | 
strictlyGreater(E element)  | 
E | 
strictlyLess(E element)  | 
protected LinkedTreeSupport(boolean concurrentAccess)
public LinkedTreeSupport(IInstanceFactory instanceFactory, boolean concurrentAccess)
protected LinkedTreeSupport(Comparator<? super E> comparator, boolean concurrentAccess)
protected LinkedTreeSupport(IInstanceFactory instanceFactory, Comparator<? super E> comparator, boolean concurrentAccess)
public static LinkedTreeSupport newInstance(IInstanceFactory instanceFactory, boolean concurrentAccess)
public static LinkedTreeSupport newInstance(IInstanceFactory instanceFactory, Comparator comparator, boolean concurrentAccess)
public void removeListener()
removeListener in interface ISupportListenable<E>public void setListener(ISupportListener<E> listener)
setListener in interface ISupportListenable<E>public IEqualsHashComparator getEqualsHashComparator()
getEqualsHashComparator in interface ILinkedListSupportNodeManager<E>public Comparator<? super E> getComparatorForComparable()
public E get(Object object)
Object.equals element implementationget in interface IListSupport<E>object - reference objectpublic E get(int index)
get in interface IListSupport<E>public E getFirst()
IListSupportgetFirst in interface IListSupport<E>public E getLast()
IListSupportgetLast in interface IListSupport<E>public int indexOf(Object object)
indexOf in interface IListSupport<E>public int lastIndexOf(Object object)
lastIndexOf in interface IListSupport<E>public boolean contains(Object object)
Object.equals element implementationcontains in interface IListSupport<E>object - the reference objectpublic E add(int index, E element)
IListSupportadd in interface IListSupport<E>index - position for addelement - element to addpublic E addAtBegin(E element)
addAtBegin in interface IListSupport<E>element - element to add at begin of listpublic E addAtEnd(E element)
IListSupportaddAtEnd in interface IListSupport<E>element - the element to addpublic E addReplace(E element)
IListSupportaddReplace in interface IListSupport<E>public void addToTree(ILinkedListSupportNode<E> node)
public ILinkedListSupportNode<E> addToTree(E element)
public E remove(Object object)
Object.equals element implementationremove in interface IListSupport<E>object - the element reference to removepublic E remove(int index)
IListSupportremove in interface IListSupport<E>index - position of element to removepublic E removeLast()
IListSupportremoveLast in interface IListSupport<E>public E removeFirst()
IListSupportremoveFirst in interface IListSupport<E>public void removeFromTree(E element)
public E set(E element, int index)
IListSupportset in interface IListSupport<E>public void clear()
IListSupportclear in interface IListSupport<E>public boolean isEmpty()
isEmpty in interface IListSupport<E>public ILinkedListSupportNode<E> getLastNode()
ILinkedListSupportNodeManagerLinkedListSupportIteratorgetLastNode in interface ILinkedListSupportNodeManager<E>public ILinkedListSupportNode<E> getFirstNode()
getFirstNode in interface ILinkedListSupportNodeManager<E>public ILinkedListSupportNode<E> getRoot()
ILinkedListSupportNodeManagerLinkedListSupportIterator and
 ILinkedListSupportNodeManager implementationgetRoot in interface ILinkedListSupportNodeManager<E>public ILinkedListSupportNode<E> newLinkedListNode()
newLinkedListNode in interface ILinkedListSupportNodeManager<E>public void setLastNode(ILinkedListSupportNode<E> lastNode)
setLastNode in interface ILinkedListSupportNodeManager<E>public void setRoot(ILinkedListSupportNode<E> rootNode)
setRoot in interface ILinkedListSupportNodeManager<E>public int getSize()
getSize in interface IListSupport<E>getSize in interface ILinkedListSupportNodeManager<E>public void decrementSize()
decrementSize in interface ILinkedListSupportNodeManager<E>public void incrementSize()
incrementSize in interface ILinkedListSupportNodeManager<E>public void resetSize()
resetSize in interface ILinkedListSupportNodeManager<E>public LinkedListSupportManager<E> getListManager()
public ListIterator<E> iterator()
IListSupportpublic ListIterator<E> iterator(int index)
IListSupportiterator in interface IListSupport<E>index - start of the iterationpublic ListIterator<E> descendingIterator()
IListSupportdescendingIterator in interface IListSupport<E>public E removeSmaller()
public E removeGreater()
public E first()
public E last()
public boolean moveToLastPosition(E element)
public boolean moveToFirstPosition(E element)
public boolean moveDown(E element)
element - public LinkedTreeSupport<E> clone()
public void setListManager(LinkedListSupportManager<E> listManager)
public void setSize(int size)
public void setTree(TreeSupport<ILinkedListSupportNode<E>> tree)
@Fortest public RedBlackTree<ILinkedListSupportNode<E>> getTree()
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.