-
- Type Parameters:
E
-
- All Superinterfaces:
java.util.Collection<E>
,java.lang.Iterable<E>
,java.util.List<E>
,PCollection<E>
,PSequence<E>
- All Known Implementing Classes:
ConsPStack
public interface PStack<E> extends PSequence<E>
An immutable, persistent stack.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PStack<E>
minus(int i)
PStack<E>
minus(java.lang.Object e)
Returns a sequence consisting of the elements of this without the first occurrence of e.PStack<E>
minusAll(java.util.Collection<?> list)
PStack<E>
plus(int i, E e)
PStack<E>
plus(E e)
Returns a stack consisting of the elements of this with e prepended.PStack<E>
plusAll(int i, java.util.Collection<? extends E> list)
PStack<E>
plusAll(java.util.Collection<? extends E> list)
Returns a stack consisting of the elements of this with list prepended in reverse.PStack<E>
subList(int start)
PStack<E>
subList(int start, int end)
PStack<E>
with(int i, E e)
-
Methods inherited from interface java.util.List
add, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, replaceAll, retainAll, size, sort, spliterator, toArray, toArray
-
-
-
-
Method Detail
-
plusAll
PStack<E> plusAll(java.util.Collection<? extends E> list)
Returns a stack consisting of the elements of this with list prepended in reverse.
-
minus
PStack<E> minus(java.lang.Object e)
Description copied from interface:PSequence
Returns a sequence consisting of the elements of this without the first occurrence of e.
-
-