public interface Seque<E> extends Collection<E>
Stacks and Queues.| Modifier and Type | Method and Description |
|---|---|
E |
peek() |
Seque<E> |
pop()
Creates a fresh instance of Seque without the end element.
|
Seque<E> |
push(E e)
Creates a fresh instance of the Seque with the element at the open end of the
Seque.Ehis ensures immutability. |
sizeSeque<E> push(E e)
Seque.e - element to be added to the end of the SequeSeque with element added to the open end.Seque<E> pop()
Seques are immutable, pop() is unlike traditional Stacks and Queues. It doesn't remove and give you the end element from the current Seque.peek() to gather the end element.Seque without the end element.E peek()
SequeCopyright © 2017. All rights reserved.