asia.redact.bracket.properties
Class NodeImpl

java.lang.Object
  extended by asia.redact.bracket.properties.NodeImpl
All Implemented Interfaces:
Node

public class NodeImpl
extends Object
implements Node

 Used to represent the properties as a tree. 
 Not all properties may effectively use this representation
 
 

Author:
Dave

Field Summary
(package private)  List<Node> children
           
(package private)  String name
           
(package private)  ValueModel value
           
 
Constructor Summary
NodeImpl(String name)
           
NodeImpl(String name, String value)
           
NodeImpl(String name, ValueModel model)
           
 
Method Summary
 void addChild(Node child)
           
 void addChild(String name, String value)
           
 void addChild(String name, ValueModel model)
           
 boolean equals(Object obj)
           
 String get()
           
 Node getChild(String nodeName)
           
 List<Node> getChildren()
           
 Node getDescendant(String nodePath)
           
 String getName()
           
 ValueModel getValue()
           
 int hashCode()
           
 boolean hasValue()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

final String name

children

final List<Node> children

value

ValueModel value
Constructor Detail

NodeImpl

NodeImpl(String name)

NodeImpl

NodeImpl(String name,
         String value)

NodeImpl

NodeImpl(String name,
         ValueModel model)
Method Detail

addChild

public void addChild(Node child)
Specified by:
addChild in interface Node

addChild

public void addChild(String name,
                     String value)
Specified by:
addChild in interface Node

addChild

public void addChild(String name,
                     ValueModel model)
Specified by:
addChild in interface Node

getChild

public Node getChild(String nodeName)
Specified by:
getChild in interface Node

getDescendant

public Node getDescendant(String nodePath)
Specified by:
getDescendant in interface Node

hasValue

public boolean hasValue()
Specified by:
hasValue in interface Node

get

public String get()
Specified by:
get in interface Node

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getName

public String getName()
Specified by:
getName in interface Node

getChildren

public List<Node> getChildren()
Specified by:
getChildren in interface Node

getValue

public ValueModel getValue()
Specified by:
getValue in interface Node


Copyright © 2011-2013 David R. Smith. All Rights Reserved.