|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.gwt.util.WrapperList<E>
public class WrapperList<E>
List wrapper. Modifiable list that delegates all methods to a wrapped list. This allows an easy subclassing.
Collections
,
List
Constructor Summary | |
---|---|
WrapperList()
Constructor. |
|
WrapperList(int initialCapacity)
Constructor. |
|
WrapperList(java.util.List<E> delegate)
Constructor. |
Method Summary | ||
---|---|---|
boolean |
add(E element)
Adds a element at the end of the list. |
|
void |
add(int index,
E element)
Inserts the specified element at the specified position in this list. |
|
boolean |
addAll(java.util.Collection<? extends E> elements)
Appends all of the elements in the specified collection to the end of this list. |
|
boolean |
addAll(int index,
java.util.Collection<? extends E> elements)
Inserts all of the elements in the specified collection into this list at the specified position. |
|
void |
clear()
Removes all of the elements from this list. |
|
boolean |
contains(java.lang.Object element)
Returns true if this list contains the specified element. |
|
boolean |
containsAll(java.util.Collection<?> elements)
Returns true if this list contains all of the elements of the specified collection. |
|
boolean |
equals(java.lang.Object o)
Compares the specified object with this list for equality. |
|
E |
get(int index)
Returns the element at the specified position in this list. |
|
protected java.util.List<E> |
getDelegate()
Returns the delegate list. |
|
int |
hashCode()
Returns the hash code value for this list. |
|
int |
indexOf(java.lang.Object element)
Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element. |
|
boolean |
isEmpty()
Returns true if this list contains no elements. |
|
java.util.Iterator<E> |
iterator()
Returns an iterator over the elements in this list in proper sequence. |
|
int |
lastIndexOf(java.lang.Object element)
Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element. |
|
java.util.ListIterator<E> |
listIterator()
Returns a list iterator of the elements in this list (in proper sequence). |
|
java.util.ListIterator<E> |
listIterator(int index)
Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in this list. |
|
E |
remove(int index)
Removes the element at the specified position in this list. |
|
boolean |
remove(java.lang.Object element)
Removes the first occurrence in this list of the specified element. |
|
boolean |
removeAll(java.util.Collection<?> elements)
Removes from this list all the elements that are contained in the specified collection. |
|
boolean |
retainAll(java.util.Collection<?> elements)
RemovesRetains only the elements in this list that are contained in the specified collection. |
|
E |
set(int index,
E element)
Replaces the element at the specified position in this list with the specified element. |
|
int |
size()
Returns the number of elements in this list. |
|
java.util.List<E> |
subList(int fromIndex,
int toIndex)
Returns a COPY of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive. |
|
java.lang.Object[] |
toArray()
Returns an array containing all of the elements in this list in proper sequence. |
|
|
toArray(T[] a)
Returns an array containing all of the elements in this list in proper sequence; the runtime type of the returned array is that of the specified array. |
|
java.lang.String |
toString()
Returns a string representation of the list. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WrapperList()
public WrapperList(int initialCapacity)
initialCapacity
- The initial list capacity.public WrapperList(java.util.List<E> delegate)
delegate
- The delegate list.Method Detail |
---|
public boolean add(E element)
add
in interface java.util.Collection<E>
add
in interface java.util.List<E>
public void add(int index, E element)
add
in interface java.util.List<E>
index
- The insertion position.element
- The element to insert.public boolean addAll(java.util.Collection<? extends E> elements)
addAll
in interface java.util.Collection<E>
addAll
in interface java.util.List<E>
elements
- The collection of elements to append.public boolean addAll(int index, java.util.Collection<? extends E> elements)
addAll
in interface java.util.List<E>
index
- The insertion position.elements
- The collection of elements to insert.public void clear()
clear
in interface java.util.Collection<E>
clear
in interface java.util.List<E>
public boolean contains(java.lang.Object element)
contains
in interface java.util.Collection<E>
contains
in interface java.util.List<E>
element
- The element to find.
public boolean containsAll(java.util.Collection<?> elements)
containsAll
in interface java.util.Collection<E>
containsAll
in interface java.util.List<E>
elements
- The collection of elements to find.
public boolean equals(java.lang.Object o)
equals
in interface java.util.Collection<E>
equals
in interface java.util.List<E>
equals
in class java.lang.Object
o
- The object to be compared for equality with this list.
public E get(int index)
get
in interface java.util.List<E>
index
- The element position.
protected java.util.List<E> getDelegate()
public int hashCode()
hashCode
in interface java.util.Collection<E>
hashCode
in interface java.util.List<E>
hashCode
in class java.lang.Object
public int indexOf(java.lang.Object element)
indexOf
in interface java.util.List<E>
element
- The element to find.
public boolean isEmpty()
isEmpty
in interface java.util.Collection<E>
isEmpty
in interface java.util.List<E>
public java.util.Iterator<E> iterator()
iterator
in interface java.lang.Iterable<E>
iterator
in interface java.util.Collection<E>
iterator
in interface java.util.List<E>
public int lastIndexOf(java.lang.Object element)
lastIndexOf
in interface java.util.List<E>
public java.util.ListIterator<E> listIterator()
listIterator
in interface java.util.List<E>
public java.util.ListIterator<E> listIterator(int index)
listIterator
in interface java.util.List<E>
index
- The starting position.public E remove(int index)
remove
in interface java.util.List<E>
public boolean remove(java.lang.Object element)
remove
in interface java.util.Collection<E>
remove
in interface java.util.List<E>
public boolean removeAll(java.util.Collection<?> elements)
removeAll
in interface java.util.Collection<E>
removeAll
in interface java.util.List<E>
elements
- The collection of element to remove.
public boolean retainAll(java.util.Collection<?> elements)
retainAll
in interface java.util.Collection<E>
retainAll
in interface java.util.List<E>
elements
- The collection of element to retain.
public E set(int index, E element)
set
in interface java.util.List<E>
index
- The position of the element to replace.element
- The new element.public int size()
size
in interface java.util.Collection<E>
size
in interface java.util.List<E>
public java.util.List<E> subList(int fromIndex, int toIndex)
subList
in interface java.util.List<E>
fromIndex
- The start position.toIndex
- The end position (exclusive).
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<E>
toArray
in interface java.util.List<E>
public <T> T[] toArray(T[] a)
toArray
in interface java.util.Collection<E>
toArray
in interface java.util.List<E>
a
- The sample array.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |