Package de.xam.featdoc.markdown
Class StringTree
java.lang.Object
de.xam.featdoc.markdown.StringTree
- All Implemented Interfaces:
Comparable<StringTree>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddChildTree(StringTree child) intvoiddump()getLabel()getOrCreateChild(@NonNull String s) booleanvoidsort()voidtoMarkdownList(LineWriter lineWriter) static voidtoMarkdownList(List<StringTree> trees, LineWriter lineWriter) toString()static StringTreeTakes O(2n) space with n=number of pairs; Runs in O(n)
-
Constructor Details
-
StringTree
-
-
Method Details
-
toTree
Takes O(2n) space with n=number of pairs; Runs in O(n)- Parameters:
pairs-- Returns:
- a tree of depth n using all (source,target) pairs to construct the tree
-
addChild
- Parameters:
label-- Returns:
- the child
-
addChildTree
- Parameters:
child-- Returns:
- the child
-
compareTo
- Specified by:
compareToin interfaceComparable<StringTree>
-
dump
public void dump() -
getChildNodesIterator
-
getChildNodesIterator
-
getLabel
-
getOrCreateChild
-
hasChildren
public boolean hasChildren() -
sort
public void sort() -
toMarkdownList
-
toMarkdownList
-
toString
-