Ableverse™
Platform 6.0

av.util
Class ArrayStack<T>

java.lang.Object
  extended by 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

Constructor Summary
ArrayStack()
           
ArrayStack(int initCapacity)
           
ArrayStack(T... elements)
           
 
Method Summary
 String catToString(String separator)
          Concate the string value of all elements into a separated string, this is just a utility method to well dump stack content.
 void clear()
           
 boolean isEmpty()
           
 T peek()
           
 T pop()
           
 T prePeek(int nToSkip)
           
 void push(T o)
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayStack

public ArrayStack(int initCapacity)

ArrayStack

public ArrayStack()

ArrayStack

public ArrayStack(T... elements)
Method Detail

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

Ableverse™
Platform 6.0

Copyright© 2006 Ableverse Platform. All rights reserved.