83
|
1 package christie.topology.manager;
|
|
2
|
|
3 public class Parent {
|
|
4 private String name;
|
|
5 private int children = 0;
|
|
6
|
|
7 public Parent(String name) {
|
|
8 this.name = name;
|
|
9 }
|
|
10
|
|
11 public int children() {
|
|
12 return children;
|
|
13 }
|
|
14
|
|
15 public void setChildren(int num) {
|
|
16 children = num;
|
|
17 }
|
|
18
|
|
19 public String getName() {
|
|
20 return name;
|
|
21 }
|
|
22
|
|
23 public void setName(String n) {
|
|
24 name = n;
|
|
25 }
|
|
26
|
|
27 public void increment() {
|
|
28 children++;
|
|
29 }
|
|
30
|
|
31 public void decrement() {
|
|
32 children--;
|
|
33 }
|
|
34
|
|
35 }
|