|
FTP-Server API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--graphic.services.tree.BinTree
The class is a binary tree, that can sort objects after the toString() method, or by the TreeNodes method (after its getSortingQualifier()).
Field Summary | |
protected TreeNode |
Root
|
Constructor Summary | |
BinTree()
|
Method Summary | |
void |
insert(Object newElement)
Inserts a new Object in the tree |
void |
insert(TreeNode newElement)
Inserts the new TreeNode element into the tree |
boolean |
soeg(String target)
Seeks for a String in the Tree, and returns true if found |
boolean |
soeg(String target,
TreeNode tree)
Seeks for a String in the Tree, and returns true if found |
LinkedList |
udskriv()
Returns a sorted tree in ascending order. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected TreeNode Root
Constructor Detail |
public BinTree()
Method Detail |
public void insert(TreeNode newElement)
newElement
- The new TreeNodepublic void insert(Object newElement)
newElement
- The new Elementpublic LinkedList udskriv()
public boolean soeg(String target)
target
- element to find.
public boolean soeg(String target, TreeNode tree)
target
- element to findtree
- element to start at.
|
FTP-Server API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |