E - The type to hold.ArrayDeque instead@Deprecated public class FastStack<E> extends Object implements Iterable<E>
Vector which is synchronized.| Constructor and Description |
|---|
FastStack()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Deprecated.
Clears the stack.
|
boolean |
contains(E element)
Deprecated.
Returns if the stack contains the specified element.
|
boolean |
isEmpty()
Deprecated.
Returns whether the stack is empty.
|
Iterator<E> |
iterator()
Deprecated.
Returns an iterator that goes from the oldest element to the newest.
|
static <T> FastStack<T> |
newInstance()
Deprecated.
Factory method to create a new instance.
|
E |
peek()
Deprecated.
Returns the entry at the top of the stack without removing it.
|
E |
peek(int index)
Deprecated.
Return the element at the specified index.
|
E |
pop()
Deprecated.
Returns the entry at the top of the stack by removing it.
|
void |
push(E element)
Deprecated.
Pushes the supplied element onto the stack.
|
int |
size()
Deprecated.
Returns the number of entries in the stack.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic void push(E element)
element - the element to push onto the stack.public boolean isEmpty()
public int size()
public E peek()
IllegalStateException - if the stack is empty.public E pop()
IllegalStateException - if the stack is empty.public E peek(int index)
index - the index to returnIllegalArgumentException - if index out of rangepublic boolean contains(E element)
element - the element to findpublic void clear()
public Iterator<E> iterator()
Copyright © 2001–2016. All rights reserved.