FileDocCategorySizeDatePackage
FileSearch.javaAPI DocExample5700Fri Jul 23 18:29:08 BST 1999tuning.loop

StringStack

public class StringStack extends Object

Fields Summary
String[]
stack
int
size
Constructors Summary
public StringStack()

    stack = new String[10];
  
Methods Summary
public booleanempty()

    return size == 0;
  
public java.lang.Stringpop()

    return stack[--size];
  
public voidpush(java.lang.String obj)

    if (size >= stack.length)
    {
      String[] tmp = new String[2*stack.length];
      System.arraycopy(stack, 0, tmp, 0, size);
      stack = tmp;
    }
    stack[size++] = obj;