|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.karaf.shell.dev.util.Node<T>
org.apache.karaf.shell.dev.util.Tree<T>
public class Tree<T>
Represents a tree that can be written to the console. The output will look like this:
root +- child1 | +- grandchild +- child2
Nested Class Summary | |
---|---|
static interface |
Tree.Converter<T>
Interface to convert node values to string |
Constructor Summary | |
---|---|
Tree(T root)
Creates a new tree with the given root node |
Method Summary | |
---|---|
void |
write(java.io.PrintStream stream)
Write the tree to a PrintStream, using the default toString() method to output the node values |
void |
write(java.io.PrintStream stream,
Tree.Converter<T> converter)
Write the tree to a PrintStream, using the provided converter to output the node values |
void |
write(java.io.PrintWriter writer)
Write the tree to a PrintWriter, using the default toString() method to output the node values |
void |
write(java.io.PrintWriter writer,
Tree.Converter<T> converter)
Write the tree to a PrintWriter, using the provided converter to output the node values |
Methods inherited from class org.apache.karaf.shell.dev.util.Node |
---|
addChild, flatten, getChildren, getValue, hasAncestor, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Tree(T root)
root
- the root nodeMethod Detail |
---|
public void write(java.io.PrintStream stream)
stream
- public void write(java.io.PrintStream stream, Tree.Converter<T> converter)
stream
- converter
- public void write(java.io.PrintWriter writer)
writer
- public void write(java.io.PrintWriter writer, Tree.Converter<T> converter)
writer
- converter
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |