au.com.zip.cs
Class HierTreeNode

java.lang.Object
  extended by au.com.zip.cs.HierTreeNode
All Implemented Interfaces:
TreeNode
Direct Known Subclasses:
ListHierTreeNode, MapHierTreeNode, ScalarHierTreeNode

public abstract class HierTreeNode
extends Object
implements TreeNode

blah

Author:
Cameron Simpson <cs@zip.com.au> 2aug2003

Constructor Summary
protected HierTreeNode(Hier h)
          Construct a TreeNode view of a Hier.
protected HierTreeNode(Hier h, TreeNode p)
          Construct a TreeNode view of a Hier.
 
Method Summary
 boolean equals(Object o)
          Compare this node for equality with another by comparison of their enclosed Hiers.
 Hier getHier()
          Return the underlying Hier.
 TreeNode getParent()
           
static HierTreeNode makeHierTreeNode(Hier h)
          Return a HierTreeNode wrapped around the supplied Hier.
static HierTreeNode toHierTreeNode(Hier h)
          Return a HierTreeNode view of an arbitrary Hier.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.swing.tree.TreeNode
children, getAllowsChildren, getChildAt, getChildCount, getIndex, isLeaf
 

Constructor Detail

HierTreeNode

protected HierTreeNode(Hier h,
                       TreeNode p)
Construct a TreeNode view of a Hier.

Parameters:
h - the Hier to present
p - the parent TreeNode

HierTreeNode

protected HierTreeNode(Hier h)
Construct a TreeNode view of a Hier.

Parameters:
h - the Hier to present
Method Detail

toHierTreeNode

public static HierTreeNode toHierTreeNode(Hier h)
Return a HierTreeNode view of an arbitrary Hier.

Parameters:
h - the Hier
Returns:
the TreeNode view.

getHier

public Hier getHier()
Return the underlying Hier.

Returns:
the Hier

getParent

public TreeNode getParent()
Specified by:
getParent in interface TreeNode

makeHierTreeNode

public static HierTreeNode makeHierTreeNode(Hier h)
Return a HierTreeNode wrapped around the supplied Hier.

Parameters:
h - the Hier
Returns:
the HierTreeNode

equals

public boolean equals(Object o)
Compare this node for equality with another by comparison of their enclosed Hiers.

Overrides:
equals in class Object
Parameters:
o - the Object to which to compare
Returns:
true if the enclosed Hiers match

toString

public String toString()
Overrides:
toString in class Object