E - the set element type@StoreNotUseStandardSerialization @StorableClass public class LinkedHashSupport<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 |
|---|---|
|
LinkedHashSupport(IEqualsHashComparator comparator) |
protected |
LinkedHashSupport(IInstanceFactory instanceFactory,
IEqualsHashComparator comparator) |
| 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 an element to the set, or replace equals object in the set
equality check is done using Object.equals element implementation |
E |
addReplace(E element)
add element at end of the list if equals element not already in the list,
else replace the equals element
|
PreviousElementAndSetNode<E> |
addToSet(E element) |
void |
addToSet(ILinkedListSupportNode<E> node) |
void |
clear()
clear the set
|
LinkedHashSupport<E> |
clone() |
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 |
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 |
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() |
TreeSupport<HashSupportNodeEntry<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
|
int |
lastIndexOf(Object object) |
boolean |
moveDown(E element) |
boolean |
moveToFirstPosition(E element) |
boolean |
moveToLastPosition(E element) |
static LinkedHashSupport |
newInstance(IInstanceFactory instanceFactory,
IEqualsHashComparator comparator) |
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 |
removeFromSet(E element) |
E |
removeLast()
remove last element of the list
|
void |
removeListener() |
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<HashSupportNodeEntry<E>> tree) |
public LinkedHashSupport(IEqualsHashComparator comparator)
protected LinkedHashSupport(IInstanceFactory instanceFactory, IEqualsHashComparator comparator)
public static LinkedHashSupport newInstance(IInstanceFactory instanceFactory, IEqualsHashComparator comparator)
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 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)
Object.equals element implementationaddAtEnd in interface IListSupport<E>element - the element to add or to move to the end of the listindex - insertion position in listpublic E addReplace(E element)
IListSupportaddReplace in interface IListSupport<E>public void addToSet(ILinkedListSupportNode<E> node)
public PreviousElementAndSetNode<E> addToSet(E element)
public E remove(Object object)
Object.equals element implementationremove in interface IListSupport<E>object - the element reference to removepublic void removeFromSet(E element)
public 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 E set(E element, int index)
IListSupportset in interface IListSupport<E>public void clear()
clear 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 void setSize(int size)
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 void setListManager(LinkedListSupportManager<E> listManager)
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 boolean moveToLastPosition(E element)
public boolean moveToFirstPosition(E element)
public boolean moveDown(E element)
element - public LinkedHashSupport<E> clone()
public void setTree(TreeSupport<HashSupportNodeEntry<E>> tree)
public TreeSupport<HashSupportNodeEntry<E>> getTree()
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.