Class Stack<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- org.eclipse.aether.util.graph.visitor.Stack<E>
-
- All Implemented Interfaces:
java.lang.Iterable<E>
,java.util.Collection<E>
,java.util.List<E>
,java.util.RandomAccess
class Stack<E> extends java.util.AbstractList<E> implements java.util.RandomAccess
A non-synchronized stack with a non-modifiable list view which starts at the top of the stack. WhileLinkedList
can provide the same behavior, it creates many temp objects upon frequent pushes/pops.
-
-
Constructor Summary
Constructors Constructor Description Stack()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description E
get(int index)
E
peek()
E
pop()
void
push(E element)
int
size()
-
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
-