public boolean contains(Object o) { if (o instanceof People) { return peopleTree.exist(((People) o).getName()); } else if (o instanceof Topic) { return topicTree.exist(((Topic) o).getName()); } return false; }
public void addTopic(Topic i) { topicTree.add(i.getName(), topics.getLength()); topics.add(i); }
public void addPeople(People p) { peopleTree.add(p.getName(), people.getLength()); people.add(p); }
public People getMember(String name) { int place = peopleTree.getValue(name); return people.get(place); }