Stack (Java SE 25 & JDK 25)
- Type Parameters:
E- Type of component elements
- All Implemented Interfaces:
Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess, SequencedCollection<E>
-
Field Summary
-
Constructor Summary
Constructors
-
Method Summary
booleanempty()Tests if this stack is empty.
peek()Looks at the object at the top of this stack without removing it from the stack.
pop()Removes the object at the top of this stack and returns that object as the value of this function.
Pushes an item onto the top of this stack.
intReturns the 1-based position where an object is on this stack.
Methods declared in class Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, spliterator, subList, toArray, toArray, toString, trimToSize
-
Constructor Details
-
Stack
-
-
Method Details
-
push
-
pop
-
peek
-
empty
-
search
-