create changelog entry
[debian/openrocket] / android-libraries / TreeViewList / src / pl / polidea / treeview / TreeNodeInfo.java
1 package pl.polidea.treeview;
2
3 /**
4  * Information about the node.
5  * 
6  * @param <T>
7  *            type of the id for the tree
8  */
9 public class TreeNodeInfo<T> {
10     private final T id;
11     private final int level;
12     private final boolean withChildren;
13     private final boolean visible;
14     private final boolean expanded;
15
16     /**
17      * Creates the node information.
18      * 
19      * @param id
20      *            id of the node
21      * @param level
22      *            level of the node
23      * @param withChildren
24      *            whether the node has children.
25      * @param visible
26      *            whether the tree node is visible.
27      * @param expanded
28      *            whether the tree node is expanded
29      * 
30      */
31     public TreeNodeInfo(final T id, final int level,
32             final boolean withChildren, final boolean visible,
33             final boolean expanded) {
34         super();
35         this.id = id;
36         this.level = level;
37         this.withChildren = withChildren;
38         this.visible = visible;
39         this.expanded = expanded;
40     }
41
42     public T getId() {
43         return id;
44     }
45
46     public boolean isWithChildren() {
47         return withChildren;
48     }
49
50     public boolean isVisible() {
51         return visible;
52     }
53
54     public boolean isExpanded() {
55         return expanded;
56     }
57
58     public int getLevel() {
59         return level;
60     }
61
62     @Override
63     public String toString() {
64         return "TreeNodeInfo [id=" + id + ", level=" + level
65                 + ", withChildren=" + withChildren + ", visible=" + visible
66                 + ", expanded=" + expanded + "]";
67     }
68
69 }