av.util
Class ArrayStack<T>
java.lang.Object
av.util.ArrayStack<T>
- All Implemented Interfaces:
- Stack<T>, Serializable
- Direct Known Subclasses:
- SynchronizedArrayStack
public class ArrayStack<T>
- extends Object
- implements Stack<T>
An array implementation of Stack interface.
- Author:
- Compl
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArrayStack
public ArrayStack(int initCapacity)
ArrayStack
public ArrayStack()
ArrayStack
public ArrayStack(T... elements)
push
public void push(T o)
- Specified by:
push in interface Stack<T>
peek
public T peek()
- Specified by:
peek in interface Stack<T>
prePeek
public T prePeek(int nToSkip)
- Specified by:
prePeek in interface Stack<T>
pop
public T pop()
- Specified by:
pop in interface Stack<T>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface Stack<T>
size
public int size()
- Specified by:
size in interface Stack<T>
clear
public void clear()
- Specified by:
clear in interface Stack<T>
catToString
public String catToString(String separator)
- Description copied from interface:
Stack
- Concate the string value of all elements into a separated string, this is
just a utility method to well dump stack content.
- Specified by:
catToString in interface Stack<T>
- Parameters:
separator - the separator chars for the result
Copyright© 2006 Ableverse Platform. All rights reserved.