Interface Stack<T>
- Type Parameters:
T- type ofStackentries
- All Superinterfaces:
Iterable<T>, StackKernel<T>, Standard<Stack<T>>
- All Known Implementing Classes:
Stack1L, Stack2, Stack3, StackSecondary
StackKernel enhanced with secondary methods.-
Method Summary
Methods inherited from interface Iterable
forEach, iterator, spliteratorMethods inherited from interface StackKernel
length, pop, pushMethods inherited from interface Standard
clear, newInstance, transferFrom
-
Method Details
-
top
-
replaceTop
Replaces the top ofthiswithx, and returns the old top.- Parameters:
x- the new top entry- Returns:
- the old top entry
- Aliases:
- reference
x - Updates:
this- Requires:
this /= <>- Ensures:
<replaceTop> is prefix of #this and this = <x> * #this[1, |#this|)
-
flip
-