FileDocCategorySizeDatePackage
ArrayStack.javaAPI DocExample485Fri Nov 03 11:00:18 GMT 2006None

ArrayStack

public class ArrayStack extends Object implements Stack

Fields Summary
private List
list
Constructors Summary
public ArrayStack()

 list = new ArrayList(); 
Methods Summary
public booleanempty()

 return list.size()==0; 
public Epop()

	Object elt = list.get(list.size()-1);
	list.remove(list.size()-1);
	return (E)elt;  // unchecked cast
    
public voidpush(E elt)

 list.add(elt); 
public java.lang.StringtoString()

 return "stack"+list.toString();