java.lang.Object
com.voytechs.jnetstream.npl.Node
com.voytechs.jnetstream.npl.NodeList
- All Implemented Interfaces:
- Visitable
- Direct Known Subclasses:
- ArrayDimensionNode
- public class NodeList
- extends Node
- implements Visitable
| Fields inherited from class com.voytechs.jnetstream.npl.Node |
token |
debug
private static final boolean debug
- See Also:
- Constant Field Values
list
private java.util.LinkedList list
NodeList
public NodeList()
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