@StoreNotUseStandardSerialization @StorableClass public class TreeListSupport<E> extends TreeSupport<E> implements IListSupport<E>, Serializable
concurrentAccess, instanceFactory, modificationCount, tree| Modifier | Constructor and Description |
|---|---|
|
TreeListSupport(IEqualsHashComparator comparator,
boolean concurrentAccess) |
protected |
TreeListSupport(IInstanceFactory instanceFactory,
IEqualsHashComparator 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
|
boolean |
contains(Object object)
to know if list contains an element equals to an object
equality check is done using Object.equals element implementation |
ListIterator<E> |
descendingIterator()
Returns an iterator over the elements in this list in reverse sequential
order.
|
boolean |
equals(Object obj) |
E |
get(int index) |
E |
get(Object object)
search for an element and return founded if one
|
E |
getFirst()
get the first element of the list
null returned if empty list or if first element is null |
E |
getLast()
get the last element of the list
null returned if empty list or if last element is null |
int |
getSize() |
int |
hashCode() |
int |
index(E element)
sequential search of element
|
int |
indexOf(Object object) |
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
|
int |
lastIndexOf(Object object) |
static TreeListSupport |
newInstance(IInstanceFactory instanceFactory,
IEqualsHashComparator comparator,
boolean concurrentAccess) |
E |
remove(E element)
remove element
|
E |
remove(int index)
remove element at index
|
E |
replace(int index,
E element) |
E |
set(E element,
int index)
add element at position
|
add, addAll, appended, clear, clone, closestGreaterOrEqual, closestGreaterOrEqualNode, closestLessOrEqual, closestLessOrEqualNode, comparator, descendingIterator, elementAtIndex, fireAdded, fireRemoved, first, firstNode, getInstanceFactory, getModificationCount, getTree, indexOfNode, isConcurrentAccess, isEmpty, isManageNodeIndex, isNodeAttachedToTree, iterator, iterator, last, lastNode, listIterator, listIterator, newInstance, newInstance, newInstance, newTreeSupportNode, nextNode, nodeAtIndex, pollFirst, pollLast, previousNode, remove, removeAt, removeFirst, removeLast, removeListener, search, setListener, size, strictlyGreater, strictlyGreaterNode, strictlyLess, strictlyLessNodefinalize, getClass, notify, notifyAll, toString, wait, wait, waitclear, isEmpty, removeFirst, removeLastremoveListener, setListenerpublic TreeListSupport(IEqualsHashComparator comparator, boolean concurrentAccess)
protected TreeListSupport(IInstanceFactory instanceFactory, IEqualsHashComparator comparator, boolean concurrentAccess)
public static TreeListSupport newInstance(IInstanceFactory instanceFactory, IEqualsHashComparator comparator, boolean concurrentAccess)
public 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>addReplace in class TreeSupport<E>public int index(E element)
index in class TreeSupport<E>element - the element searching its indexpublic E set(E element, int index)
IListSupportset in interface IListSupport<E>public E add(int index, E element)
IListSupportadd in interface IListSupport<E>index - position for addelement - element to addpublic boolean contains(Object object)
IListSupportObject.equals element implementationcontains in interface IListSupport<E>object - the element to search forpublic E get(Object object)
IListSupportget in interface IListSupport<E>object - the element to search forpublic 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 getSize()
getSize in interface IListSupport<E>public E remove(E element)
IListSupportremove in interface IListSupport<E>remove in class TreeSupport<E>element - the element to removepublic E remove(int index)
IListSupportremove in interface IListSupport<E>index - position of element to removepublic int indexOf(Object object)
indexOf in interface IListSupport<E>public int lastIndexOf(Object object)
lastIndexOf in interface IListSupport<E>public ListIterator<E> iterator()
IListSupportiterator in interface Iterable<E>iterator in interface IListSupport<E>iterator in class TreeSupport<E>public ListIterator<E> iterator(int index)
IListSupportiterator in interface IListSupport<E>iterator in class TreeSupport<E>index - start of the iterationpublic ListIterator<E> descendingIterator()
IListSupportdescendingIterator in interface IListSupport<E>descendingIterator in class TreeSupport<E>Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.