E
- the list element typepublic interface IListSupport<E> extends Iterable<E>, ISupportListenable<E>
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
|
void |
clear()
clear the list
|
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.
|
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 |
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) |
E |
remove(E element)
remove element
|
E |
remove(int index)
remove element at index
|
E |
removeFirst()
remove first element of the list
|
E |
removeLast()
remove last element of the list
|
E |
set(E element,
int index)
add element at position
|
removeListener, setListener
E set(E element, int index)
element
- index
- resize
- true if allow list resisingIndexOutOfBoundsException
- position is out of listE addAtEnd(E element)
element
- the element to addE addAtBegin(E element)
element
- element to add at begin of listE add(int index, E element)
index
- position for addelement
- element to addE addReplace(E element)
E remove(E element)
element
- the element to removeE remove(int index)
index
- position of element to removeE removeFirst()
E removeLast()
E getFirst()
E getLast()
int indexOf(Object object)
object
- int lastIndexOf(Object object)
object
- E get(Object object)
object
- the element to search forE get(int index)
index
- IndexOutOfBoundsException
- if the specified index is out of range (
index < 0 || index >= size()).boolean contains(Object object)
Object.equals
element implementationobject
- the element to search forvoid clear()
int getSize()
boolean isEmpty()
ListIterator<E> iterator()
ListIterator<E> iterator(int index)
index
- start of the iterationListIterator<E> descendingIterator()
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.