Package uk.blankaspect.common.basictree
Class NullNode
java.lang.Object
uk.blankaspect.common.basictree.AbstractNode
uk.blankaspect.common.basictree.NullNode
- All Implemented Interfaces:
 Cloneable,ITreeNode<AbstractNode>
This class implements a node that represents a null value.
- 
Field Summary
Fields - 
Constructor Summary
ConstructorsConstructorDescriptionNullNode()Creates a new instance of a null node that has no parent.NullNode(AbstractNode parent) Creates a new instance of a null node that has the specified parent. - 
Method Summary
Modifier and TypeMethodDescriptionclone()Creates and returns a copy of this null node that has no parent.booleanReturnstrueif the specified object is an instance ofNullNode.getType()Returns the type of this node.inthashCode()Returns the hash code of this null node.booleanReturnstrueif this node can contain other nodes.toString()Returns a string representation of this null node.Methods inherited from class uk.blankaspect.common.basictree.AbstractNode
getChildren, getListIndex, getMapKey, getParent, isRoot, setParent, toString 
- 
Field Details
- 
VALUE
The string representation of a null node.- See Also:
 
 - 
TYPE
The type of a null node. 
 - 
 - 
Constructor Details
- 
NullNode
public NullNode()Creates a new instance of a null node that has no parent. - 
NullNode
Creates a new instance of a null node that has the specified parent.- Parameters:
 parent- the parent of the null node.
 
 - 
 - 
Method Details
- 
getType
Description copied from class:AbstractNodeReturns the type of this node.- Specified by:
 getTypein classAbstractNode- Returns:
 TYPE.
 - 
isContainer
public boolean isContainer()Returnstrueif this node can contain other nodes. For a null node, this method always returnsfalse.- Specified by:
 isContainerin classAbstractNode- Returns:
 false.
 - 
equals
Returnstrueif the specified object is an instance ofNullNode. - 
hashCode
public int hashCode()Returns the hash code of this null node. - 
clone
Creates and returns a copy of this null node that has no parent.- Overrides:
 clonein classAbstractNode- Returns:
 - a copy of this null node that has no parent.
 
 - 
toString
Returns a string representation of this null node. 
 -