|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IndexedList<E>
IndexedList implementations guarantee fast random access to elements via List.get(int).
| Method Summary | |
|---|---|
IndexedList<E> |
append(E elem)
Returns a list with the specified element appended to the bottom of the list. |
IndexedList<E> |
drop(int number)
Returns a list containing all elements in this list, excluding the first number of elements. |
IndexedList<E> |
prepend(E elem)
Returns a list with the specified element prepended to the top of the list. |
IndexedList<E> |
range(int from,
boolean fromInclusive,
int to,
boolean toInclusive)
Returns a list containing a contiguous range of elements from this list. |
IndexedList<E> |
set(int i,
E elem)
Returns a list with the element set to the value specified at the index (zero-based). |
IndexedList<E> |
take(int number)
Returns a list containing the first number of elements from this list. |
| Methods inherited from interface com.github.andrewoma.dexx.collection.List |
|---|
asList, first, get, indexOf, last, lastIndexOf, tail |
| Methods inherited from interface com.github.andrewoma.dexx.collection.Iterable |
|---|
iterator |
| Methods inherited from interface com.github.andrewoma.dexx.collection.Traversable |
|---|
forEach, isEmpty, makeString, makeString, size, to, toArray, toArray, toIndexedList, toSet, toSortedSet |
| Method Detail |
|---|
@NotNull
IndexedList<E> set(int i,
E elem)
List
set in interface List<E>@NotNull IndexedList<E> append(E elem)
List
append in interface List<E>@NotNull IndexedList<E> prepend(E elem)
List
prepend in interface List<E>@NotNull IndexedList<E> drop(int number)
Listnumber of elements.
drop in interface List<E>@NotNull IndexedList<E> take(int number)
Listnumber of elements from this list.
take in interface List<E>
@NotNull
IndexedList<E> range(int from,
boolean fromInclusive,
int to,
boolean toInclusive)
List
range in interface List<E>from - starting index for the range (zero-based)fromInclusive - if true, the element at the from index will be includedto - end index for the range (zero-based)toInclusive - if true, the element at the to index will be included
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||