Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.voytechs.jnetstream.npl
Class NodeList  view NodeList download NodeList.java

java.lang.Object
  extended bycom.voytechs.jnetstream.npl.Node
      extended bycom.voytechs.jnetstream.npl.NodeList
All Implemented Interfaces:
Visitable
Direct Known Subclasses:
ArrayDimensionNode

public class NodeList
extends Node
implements Visitable


Field Summary
private static boolean debug
           
private  java.util.LinkedList list
           
 
Fields inherited from class com.voytechs.jnetstream.npl.Node
token
 
Constructor Summary
NodeList()
           
 
Method Summary
 void add(int index, Node node)
           
 boolean add(Node node)
           
 void addFirst(Node node)
           
 void addLast(Node node)
           
 boolean canOptimize()
           
 void clear()
           
 boolean contains(Node node)
           
 boolean empty()
           
 Node get(int index)
           
 boolean getBoolean(int index)
           
 Node getFirst()
           
 int getInt(int index)
          Convenience functions that assume a specific type of node.
 Node getLast()
           
 java.lang.String getString(int index)
           
 int indexOf(Node node)
           
static void main(java.lang.String[] args)
          Test function for NodeList
 void merge(NodeList list)
           
 Node optimize()
           
 Node remove(int index)
           
 boolean remove(Node node)
           
 int size()
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 boolean visit(Visitor visitor, java.lang.Object user1, java.lang.Object user2)
           
 
Methods inherited from class com.voytechs.jnetstream.npl.Node
getToken, setToken
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debug

private static final boolean debug
See Also:
Constant Field Values

list

private java.util.LinkedList list
Constructor Detail

NodeList

public NodeList()
Method Detail

visit

public boolean visit(Visitor visitor,
                     java.lang.Object user1,
                     java.lang.Object user2)
              throws NodeException
Specified by:
visit in interface Visitable

add

public void add(int index,
                Node node)

add

public boolean add(Node node)

addFirst

public void addFirst(Node node)

addLast

public void addLast(Node node)

clear

public void clear()

contains

public boolean contains(Node node)

indexOf

public int indexOf(Node node)

empty

public boolean empty()

size

public int size()

get

public Node get(int index)

getFirst

public Node getFirst()

getLast

public Node getLast()

getInt

public int getInt(int index)
Convenience functions that assume a specific type of node.


getString

public java.lang.String getString(int index)

getBoolean

public boolean getBoolean(int index)

remove

public boolean remove(Node node)

remove

public Node remove(int index)

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).


canOptimize

public boolean canOptimize()
Specified by:
canOptimize in class Node

optimize

public Node optimize()
Specified by:
optimize in class Node

merge

public void merge(NodeList list)

main

public static void main(java.lang.String[] args)
Test function for NodeList