| Modifier | Constructor and Description |
|---|---|
|
EListImpl() |
|
EListImpl(EList<T> elist) |
protected |
EListImpl(int initialCapacity) |
|
EListImpl(List<T> delegate) |
|
EListImpl(T... values) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
T element) |
boolean |
add(T e) |
boolean |
addAll(Collection<? extends T> c) |
boolean |
addAll(int index,
Collection<? extends T> c) |
EList<T> |
addItems(Collection<? extends T> values)
Appends all of the elements in the specific collections onto the end of this list.
|
EList<T> |
addItems(T... values)
Appends all of the specified elements onto the end of this list.
|
T |
at(int index)
Returns the element at the given index, or null if the element does not
exist.
|
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
EList<T> |
duplicate()
Creates a copy of this
EList containing the same elements. |
boolean |
equals(Object o) |
T |
first()
Returns the first element of this list, or null if none exists.
|
T |
get(int index) |
EList<T> |
getItems(EPredicate<T> predicate) |
EList<T> |
getItems(int index,
int size)
Returns a list of the items from the given index for the given size.
|
int |
hashCode() |
int |
indexOf(Object o) |
EList<T> |
insertItems(int index,
Collection<? extends T> value)
Inserts all of the elements in the specified collections of elements into
this list at the specified position.
|
EList<T> |
insertItems(int index,
T... values)
Inserts all of the elements in the specified elements into this list at
the specified position.
|
boolean |
isEmpty() |
Iterator<T> |
iterator() |
T |
last()
Returns the last element of this list, or null if none exists.
|
int |
lastIndexOf(Object o) |
ListIterator<T> |
listIterator() |
ListIterator<T> |
listIterator(int index) |
T |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
EList<T> |
removeItems(Collection<? extends T> values)
Removes from this list all of the elements in the specified collections.
|
EList<T> |
removeItems(EPredicate<T> predicate) |
EList<T> |
removeItems(T... values)
Removes from this list all of the specified elements.
|
boolean |
retainAll(Collection<?> c) |
EList<T> |
retainItems(Collection<? extends T> values)
Retains only the elements in this list that are contained in the
specified collections.
|
EList<T> |
retainItems(EPredicate<T> predicate) |
EList<T> |
retainItems(T... values)
Retains only the elements in this list that are specified.
|
T |
set(int index,
T element) |
int |
size() |
EList<T> |
sort(Comparator<T> comparator)
Sorts this
EList in place using the given comparator. |
Pair<EList<T>,EList<T>> |
split(EPredicate<T> predicate) |
EList<T> |
subList(int fromIndex,
int toIndex)
Redefines
List.subList(int, int) to return an EList |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
String |
toString() |
protected EListImpl(int initialCapacity)
public EListImpl()
public EListImpl(T... values)
public EList<T> duplicate()
EListEList containing the same elements.public EList<T> addItems(T... values)
EListpublic EList<T> addItems(Collection<? extends T> values)
EListAppends all of the elements in the specific collections onto the end of this list.
The new elements will appear in this list in the order that the collections they reside in specify.
public EList<T> insertItems(int index, T... values)
EListinsertItems in interface EList<T>index - index at which to insert the first element from the specified
collectionvalues - element(s) to be added to this listpublic EList<T> insertItems(int index, Collection<? extends T> value)
EListinsertItems in interface EList<T>index - index at which to insert the first element from the specified
collectionvalue - collections containing the element(s) to be added to this listpublic EList<T> removeItems(T... values)
EListremoveItems in interface EList<T>values - the elements to be removed from this listpublic EList<T> removeItems(Collection<? extends T> values)
EListremoveItems in interface EList<T>values - collections containing the elements to be removed from this
listpublic EList<T> retainItems(Collection<? extends T> values)
EListretainItems in interface EList<T>List.retainAll(Collection)public EList<T> retainItems(T... values)
EListretainItems in interface EList<T>List.retainAll(Collection)public T at(int index)
EListpublic T first()
EListpublic T last()
EListpublic boolean add(T e)
public boolean addAll(Collection<? extends T> c)
public boolean addAll(int index,
Collection<? extends T> c)
public void clear()
public boolean contains(Object o)
public boolean containsAll(Collection<?> c)
containsAll in interface Collection<T>containsAll in interface List<T>public boolean isEmpty()
public int lastIndexOf(Object o)
lastIndexOf in interface List<T>public ListIterator<T> listIterator()
listIterator in interface List<T>public ListIterator<T> listIterator(int index)
listIterator in interface List<T>public boolean remove(Object o)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public int size()
public EList<T> subList(int fromIndex, int toIndex)
EListList.subList(int, int) to return an EListpublic Object[] toArray()
public <T> T[] toArray(T[] a)
public EList<T> getItems(int index, int size)
EList
EList<String> list = Expressive.list("A","B","C");
EList<String> items = list.getItems(-2,3);
assertThat(items.size(), is(1));
assertThat(items, is(list("A")));
public EList<T> getItems(EPredicate<T> predicate)
public EList<T> retainItems(EPredicate<T> predicate)
retainItems in interface EList<T>public EList<T> removeItems(EPredicate<T> predicate)
removeItems in interface EList<T>public EList<T> sort(Comparator<T> comparator)
EListEList in place using the given comparator.sort in interface EList<T>comparator - Collections.sort(List)public boolean equals(Object o)
public int hashCode()
Copyright © 2013 Atomic Leopard. All Rights Reserved.