public interface BooleanStack extends Stack<Boolean>
Stack; provides some additional methods that use polymorphism to avoid (un)boxing.| Modifier and Type | Method and Description |
|---|---|
default Boolean |
peek(int i)
Deprecated.
Please use the corresponding type-specific method instead.
|
boolean |
peekBoolean(int i)
Peeks at an element on the stack (optional operation).
|
default Boolean |
pop()
Deprecated.
Please use the corresponding type-specific method instead.
|
boolean |
popBoolean()
Pops the top off the stack.
|
void |
push(boolean k)
Pushes the given object on the stack.
|
default void |
push(Boolean o)
Deprecated.
Please use the corresponding type-specific method instead.
|
default Boolean |
top()
Deprecated.
Please use the corresponding type-specific method instead.
|
boolean |
topBoolean()
Peeks at the top of the stack (optional operation).
|
void push(boolean k)
k - the object to push on the stack.Stack.push(Object)boolean popBoolean()
Stack.pop()boolean topBoolean()
Stack.top()boolean peekBoolean(int i)
i - an index from the stop of the stack (0 represents the top).i-th element on the stack.Stack.peek(int)@Deprecated default void push(Boolean o)
This default implementation delegates to the corresponding type-specific method.
@Deprecated default Boolean pop()
This default implementation delegates to the corresponding type-specific method.
@Deprecated default Boolean top()
This default implementation returns peek(0).
This default implementation delegates to the corresponding type-specific method.
@Deprecated default Boolean peek(int i)
This default implementation just throws an UnsupportedOperationException.
This default implementation delegates to the corresponding type-specific method.
Copyright © 2020. All rights reserved.