com.akiban.sql.parser
Class QueryTreeNodeList<N extends QueryTreeNode>

java.lang.Object
  extended by com.akiban.sql.parser.QueryTreeNode
      extended by com.akiban.sql.parser.QueryTreeNodeList<N>
All Implemented Interfaces:
Visitable, Iterable<N>
Direct Known Subclasses:
FromList, IndexColumnList, IndexHintList, OrderedColumnList, ResultColumnList, SubqueryList, TableElementList, ValueNodeList, WindowList

public abstract class QueryTreeNodeList<N extends QueryTreeNode>
extends QueryTreeNode
implements Iterable<N>

QueryTreeNodeList is the root class for all lists of query tree nodes. It provides a wrapper for java.util.List. All lists of query tree nodes inherit from QueryTreeNodeList.


Field Summary
 
Fields inherited from class com.akiban.sql.parser.QueryTreeNode
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
 
Constructor Summary
QueryTreeNodeList()
           
 
Method Summary
 void add(int index, N n)
           
 void add(N n)
           
 void addAll(QueryTreeNodeList<N> other)
           
 void clear()
           
 void copyFrom(QueryTreeNode node)
          Fill this node with a deep copy of the given node.
 void destructiveAddAll(QueryTreeNodeList<N> other)
           
 N get(int index)
           
protected  List<N> getList()
           
 int indexOf(N n)
           
 boolean isEmpty()
           
 Iterator<N> iterator()
           
 void printSubNodes(int depth)
          Prints the sub-nodes of this object.
 N remove(int index)
           
 void remove(N n)
           
 void set(int index, N n)
           
 int size()
           
 
Methods inherited from class com.akiban.sql.parser.QueryTreeNode
accept, convertDefaultNode, debugFlush, debugPrint, formatNodeString, getBeginOffset, getDebugOutput, getEndOffset, getNodeFactory, getNodeType, getNullNode, getParserContext, getStatementType, getUserData, init, init, init, init, init, init, init, init, init, init, init, init, init, init, isInstanceOf, makeTableName, makeTableName, nodeHeader, printLabel, setBeginOffset, setDebugOutput, setEndOffset, setNodeType, setParserContext, setUserData, stackPrint, toString, treePrint, treePrint, treePrint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryTreeNodeList

public QueryTreeNodeList()
Method Detail

size

public final int size()

getList

protected List<N> getList()

isEmpty

public final boolean isEmpty()

get

public N get(int index)

add

public void add(N n)

remove

public final N remove(int index)

remove

public final void remove(N n)

indexOf

public final int indexOf(N n)

set

public final void set(int index,
                      N n)

add

public final void add(int index,
                      N n)

addAll

public final void addAll(QueryTreeNodeList<N> other)

clear

public final void clear()

iterator

public final Iterator<N> iterator()
Specified by:
iterator in interface Iterable<N extends QueryTreeNode>

destructiveAddAll

public final void destructiveAddAll(QueryTreeNodeList<N> other)

copyFrom

public void copyFrom(QueryTreeNode node)
              throws StandardException
Fill this node with a deep copy of the given node.

Overrides:
copyFrom in class QueryTreeNode
Throws:
StandardException

printSubNodes

public void printSubNodes(int depth)
Prints the sub-nodes of this object. See QueryTreeNode.java for how tree printing is supposed to work.

Overrides:
printSubNodes in class QueryTreeNode
Parameters:
depth - The depth to indent the sub-nodes


Copyright © 2013 Akiban Technologies, Inc. All rights reserved.