1   package org.jaxen.javabean;
2   
3   import java.util.Set;
4   import java.util.HashSet;
5   
6   public class Person
7   {
8       private String name;
9       private int age;
10  
11      private Set brothers;
12  
13      public Person(String name,
14                    int age)
15      {
16          this.name = name;
17          this.age  = age;
18          this.brothers = new HashSet();
19      }
20  
21      public String getName()
22      {
23          return this.name;
24      }
25  
26      public int getAge()
27      {
28          return this.age;
29      }
30  
31      public void addBrother(Person brother)
32      {
33          this.brothers.add( brother );
34      }
35  
36      public Set getBrothers()
37      {
38          return this.brothers;
39      }
40  
41      public String toString()
42      {
43          return "[Person: " + this.name + "]";
44      }
45  }