FTP-Server API

graphic.services.tree
Interface TreeNode

All Known Implementing Classes:
DefaultTreeNode

public interface TreeNode

This interface is used as a node in a Binary Tree.


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 left)
          Saves 'RightNode' in the data core.
 

Method Detail

getSortingQualifier

public String getSortingQualifier()
Returns what should be sorted by.

Returns:
by Object fx.( object.toString() )

setLeftNode

public void setLeftNode(TreeNode left)
Saves 'LeftNode' in the data core.

Parameters:
left -

setRightNode

public void setRightNode(TreeNode left)
Saves 'RightNode' in the data core.

Parameters:
left -

getLeftNode

public TreeNode getLeftNode()
Returns LeftNode

Returns:
.

getRightNode

public TreeNode getRightNode()
Returns RightNode

Returns:
.

getElement

public Object getElement()
Returns the elementet - Not 'this', but the object, that tis node is holding.

Returns:
elementet.

compareTo

public 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. If they are alike, 0 is returned, and if the passed node is less than itself, 1 is returned..

Parameters:
treeNode - The node that is compared with
Returns:
-1 ,0,1

FTP-Server API