Interface LinkedList<E>
-
- All Superinterfaces:
Iterable<E>
,java.lang.Iterable<E>
,List<E>
,Traversable<E>
- All Known Implementing Classes:
AbstractLinkedList
,Cons
,ConsList
,Nil
public interface LinkedList<E> extends List<E>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull LinkedList<E>
append(E elem)
Returns a list with the specified element appended to the bottom of the list.@NotNull LinkedList<E>
drop(int number)
Returns a list containing all elements in this list, excluding the firstnumber
of elements.@NotNull LinkedList<E>
prepend(E elem)
Returns a list with the specified element prepended to the top of the list.@NotNull LinkedList<E>
range(int from, boolean fromInclusive, int to, boolean toInclusive)
Returns a list containing a contiguous range of elements from this list.@NotNull LinkedList<E>
set(int i, E elem)
Returns a list with the element set to the value specified at the index (zero-based).@NotNull LinkedList<E>
tail()
Returns a list containing all elements in the list, excluding the first element.@NotNull LinkedList<E>
take(int number)
Returns a list containing the firstnumber
of elements from this list.-
Methods inherited from interface com.github.andrewoma.dexx.collection.List
asList, first, get, indexOf, last, lastIndexOf
-
Methods inherited from interface com.github.andrewoma.dexx.collection.Traversable
forEach, isEmpty, makeString, makeString, size, to, toArray, toArray, toIndexedList, toSet, toSortedSet
-
-
-
-
Method Detail
-
set
@NotNull @NotNull LinkedList<E> set(int i, E elem)
Description copied from interface:List
Returns a list with the element set to the value specified at the index (zero-based).
-
append
@NotNull @NotNull LinkedList<E> append(E elem)
Description copied from interface:List
Returns a list with the specified element appended to the bottom of the list.
-
prepend
@NotNull @NotNull LinkedList<E> prepend(E elem)
Description copied from interface:List
Returns a list with the specified element prepended to the top of the list.
-
drop
@NotNull @NotNull LinkedList<E> drop(int number)
Description copied from interface:List
Returns a list containing all elements in this list, excluding the firstnumber
of elements.
-
take
@NotNull @NotNull LinkedList<E> take(int number)
Description copied from interface:List
Returns a list containing the firstnumber
of elements from this list.
-
tail
@NotNull @NotNull LinkedList<E> tail()
Description copied from interface:List
Returns a list containing all elements in the list, excluding the first element. An empty list is returned if the list is empty.
-
range
@NotNull @NotNull LinkedList<E> range(int from, boolean fromInclusive, int to, boolean toInclusive)
Description copied from interface:List
Returns a list containing a contiguous range of elements from this list.
-
-