Package com.microstrategy.utils
Class UnsynchronizedStack
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList
-
- com.microstrategy.utils.UnsynchronizedStack
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable
,java.util.Collection
,java.util.List
,java.util.RandomAccess
public class UnsynchronizedStack extends java.util.ArrayList
Provides various peek and push operations similar to theStack
class except this is unsynchronized.- Since:
- MicroStrategy Web 8.1.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UnsynchronizedStack()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
peek()
java.lang.Object
peekFirst()
java.lang.Object
pop()
Removes last object on the stack.java.lang.Object
popFirst()
Removes first object in the stack.void
push(java.lang.Object obj)
Equivalent toArrayList.add(java.lang.Object)
.-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
-
-
-
Method Detail
-
push
public void push(java.lang.Object obj)
Equivalent toArrayList.add(java.lang.Object)
.- Parameters:
obj
- object to be added to the end of the stack.
-
peekFirst
public java.lang.Object peekFirst()
- Returns:
- first object on the stack.
-
popFirst
public java.lang.Object popFirst()
Removes first object in the stack.- Returns:
- first object on the stack, or null if none.
-
peek
public java.lang.Object peek()
- Returns:
- last object on the stack, or null if none.
-
pop
public java.lang.Object pop()
Removes last object on the stack.- Returns:
- last object on the stack, or null if none.
-
-