public interface Seque<E> extends Collection<E>
Stack
s and Queue
s.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. |
size
Seque<E> push(E e)
Seque
.e
- element to be added to the end of the Seque
Seque
with element added to the open end.Seque<E> pop()
Seque
s 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()
Seque
Copyright © 2017. All rights reserved.