org.basex.query.var
Class VarStack

java.lang.Object
  extended by org.basex.util.list.ElementList
      extended by org.basex.query.var.VarStack

public final class VarStack
extends ElementList

Variable stack.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen, Leo Woerteler

Field Summary
 Var[] vars
          Variable expressions.
 
Fields inherited from class org.basex.util.list.ElementList
factor, size
 
Constructor Summary
VarStack()
          Default constructor.
VarStack(int c)
          Default constructor.
 
Method Summary
 void clear()
          Empties this stack.
 Var get(QNm name)
          Returns a variable with the specified name; should only be used while parsing because it ignores ids of variables.
 void push(Var v)
          Adds the specified variable.
 
Methods inherited from class org.basex.util.list.ElementList
isEmpty, newSize, newSize, reset, size, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vars

public Var[] vars
Variable expressions.

Constructor Detail

VarStack

public VarStack()
Default constructor.


VarStack

public VarStack(int c)
Default constructor.

Parameters:
c - initial capacity
Method Detail

push

public void push(Var v)
Adds the specified variable.

Parameters:
v - variable

get

public Var get(QNm name)
Returns a variable with the specified name; should only be used while parsing because it ignores ids of variables.

Parameters:
name - variable name
Returns:
variable

clear

public void clear()
Empties this stack.