|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.grizzly.utils.LightArrayList<E>
public class LightArrayList<E>
Lighter version of ArrayList, which internaly uses array offset, to
avoid redundant array shifting when executing add, remove methods.
| Constructor Summary | |
|---|---|
LightArrayList()
|
|
LightArrayList(int initialCapacity)
|
|
LightArrayList(List<E> parentList,
int fromIndex,
int toIndex)
|
|
| Method Summary | ||
|---|---|---|
boolean |
add(E e)
|
|
void |
add(int index,
E element)
|
|
boolean |
addAll(Collection<? extends E> c)
|
|
boolean |
addAll(int index,
Collection<? extends E> c)
|
|
void |
clear()
|
|
boolean |
contains(Object o)
|
|
boolean |
containsAll(Collection<?> c)
|
|
void |
ensureCapacity(int newCapacity)
|
|
boolean |
equals(Object o)
Compares the specified object with this list for equality. |
|
E |
get(int index)
|
|
int |
hashCode()
Returns the hash code value for this list. |
|
int |
indexOf(Object o)
|
|
boolean |
isEmpty()
|
|
Iterator<E> |
iterator()
|
|
int |
lastIndexOf(Object o)
|
|
ListIterator<E> |
listIterator()
|
|
ListIterator<E> |
listIterator(int i)
|
|
E |
remove(int index)
|
|
boolean |
remove(Object o)
|
|
boolean |
removeAll(Collection<?> c)
|
|
boolean |
retainAll(Collection<?> c)
|
|
E |
set(int index,
E element)
|
|
int |
size()
|
|
void |
size(int size)
|
|
List<E> |
subList(int fromIndex,
int toIndex)
|
|
Object[] |
toArray()
|
|
|
toArray(T[] a)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LightArrayList()
public LightArrayList(int initialCapacity)
public LightArrayList(List<E> parentList,
int fromIndex,
int toIndex)
| Method Detail |
|---|
public int size()
size in interface Collection<E>size in interface List<E>public void size(int size)
public boolean isEmpty()
isEmpty in interface Collection<E>isEmpty in interface List<E>public boolean contains(Object o)
contains in interface Collection<E>contains in interface List<E>public Object[] toArray()
toArray in interface Collection<E>toArray in interface List<E>public <T> T[] toArray(T[] a)
toArray in interface Collection<E>toArray in interface List<E>public boolean add(E e)
add in interface Collection<E>add in interface List<E>
public void add(int index,
E element)
add in interface List<E>public boolean addAll(Collection<? extends E> c)
addAll in interface Collection<E>addAll in interface List<E>
public boolean addAll(int index,
Collection<? extends E> c)
addAll in interface List<E>public E remove(int index)
remove in interface List<E>public boolean remove(Object o)
remove in interface Collection<E>remove in interface List<E>public boolean removeAll(Collection<?> c)
removeAll in interface Collection<E>removeAll in interface List<E>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<E>containsAll in interface List<E>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<E>retainAll in interface List<E>public void clear()
clear in interface Collection<E>clear in interface List<E>public E get(int index)
get in interface List<E>
public E set(int index,
E element)
set in interface List<E>public int indexOf(Object o)
indexOf in interface List<E>public int lastIndexOf(Object o)
lastIndexOf in interface List<E>public Iterator<E> iterator()
iterator in interface Iterable<E>iterator in interface Collection<E>iterator in interface List<E>public ListIterator<E> listIterator()
listIterator in interface List<E>public ListIterator<E> listIterator(int i)
listIterator in interface List<E>
public List<E> subList(int fromIndex,
int toIndex)
subList in interface List<E>public boolean equals(Object o)
true if and only if the specified object is also a list, both
lists have the same size, and all corresponding pairs of elements in
the two lists are equal. (Two elements e1 and
e2 are equal if (e1==null ? e2==null :
e1.equals(e2)).) In other words, two lists are defined to be
equal if they contain the same elements in the same order.
This implementation first checks if the specified object is this
list. If so, it returns true; if not, it checks if the
specified object is a list. If not, it returns false; if so,
it iterates over both lists, comparing corresponding pairs of elements.
If any comparison returns false, this method returns
false. If either iterator runs out of elements before the
other it returns false (as the lists are of unequal length);
otherwise it returns true when the iterations complete.
equals in interface Collection<E>equals in interface List<E>equals in class Objecto - the object to be compared for equality with this list
true if the specified object is equal to this listpublic int hashCode()
This implementation uses exactly the code that is used to define the
list hash function in the documentation for the List.hashCode()
method.
hashCode in interface Collection<E>hashCode in interface List<E>hashCode in class Objectpublic void ensureCapacity(int newCapacity)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||