|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- @Immutable public interface JImmutableStack<T>
Interface for objects that store values in LIFO form. Elements are always added at the front of the list so elements are traversed in reverse order.
Method Summary | |
---|---|
T |
getHead()
Accesses the first value in the List. |
JImmutableStack<T> |
getTail()
Accesses the rest of the List (i.e. |
JImmutableStack<T> |
insert(T value)
Returns a new list containing the value before the element returned by getHead(). |
boolean |
isEmpty()
Determines if this is the end of the Sequence. |
JImmutableStack<T> |
remove()
Returns a list without the element returned by getHead(). |
Methods inherited from interface org.javimmutable.collections.Cursorable |
---|
cursor |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Method Detail |
---|
boolean isEmpty()
Sequence
isEmpty
in interface Sequence<T>
T getHead()
getHead
in interface Sequence<T>
@Nonnull JImmutableStack<T> getTail()
getTail
in interface Sequence<T>
@Nonnull JImmutableStack<T> insert(@Nullable T value)
insert
in interface Insertable<T>
value
-
@Nonnull JImmutableStack<T> remove()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |