FTP-Server API

graphic.services.tree
Class DefaultTreeNode

java.lang.Object
  |
  +--graphic.services.tree.DefaultTreeNode
All Implemented Interfaces:
TreeNode

public class DefaultTreeNode
extends Object
implements TreeNode

This class is a default implementation of a TreeNode. It is sorted after the toString() method.


Constructor Summary
DefaultTreeNode(Object element)
          Set-Constructor.
 
Method Summary
 int compareTo(TreeNode treeNode)
          Compares the node with another node
If the node that is beeing compared with is larger than the node itself, -1 is returned.
 Object getElement()
          Returns the elementet - Not 'this', but the object, that tis node is holding.
 TreeNode getLeftNode()
          Returns LeftNode
 TreeNode getRightNode()
          Returns RightNode
 String getSortingQualifier()
          Returns what should be sorted by.
 void setLeftNode(TreeNode left)
          Saves 'LeftNode' in the data core.
 void setRightNode(TreeNode right)
          Saves 'RightNode' in the data core.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTreeNode

public DefaultTreeNode(Object element)
Set-Constructor.

Parameters:
element -
Method Detail

getSortingQualifier

public String getSortingQualifier()
Description copied from interface: TreeNode
Returns what should be sorted by.

Specified by:
getSortingQualifier in interface TreeNode
Returns:
by Object fx.( object.toString() )

setLeftNode

public void setLeftNode(TreeNode left)
Description copied from interface: TreeNode
Saves 'LeftNode' in the data core.

Specified by:
setLeftNode in interface TreeNode
Parameters:
left -

setRightNode

public void setRightNode(TreeNode right)
Description copied from interface: TreeNode
Saves 'RightNode' in the data core.

Specified by:
setRightNode in interface TreeNode
Parameters:
right -

getLeftNode

public TreeNode getLeftNode()
Description copied from interface: TreeNode
Returns LeftNode

Specified by:
getLeftNode in interface TreeNode
Returns:
.

getRightNode

public TreeNode getRightNode()
Description copied from interface: TreeNode
Returns RightNode

Specified by:
getRightNode in interface TreeNode
Returns:
.

getElement

public Object getElement()
Description copied from interface: TreeNode
Returns the elementet - Not 'this', but the object, that tis node is holding.

Specified by:
getElement in interface TreeNode
Returns:
elementet.

compareTo

public int compareTo(TreeNode treeNode)
Description copied from interface: TreeNode
Compares the node with another node
If the node that is beeing compared with is larger than the node itself, -1 is returned. If they are alike, 0 is returned, and if the passed node is less than itself, 1 is returned..

Specified by:
compareTo in interface TreeNode
Parameters:
treeNode - The node that is compared with
Returns:
-1 ,0,1

FTP-Server API