1 package Analysis.SSJava;
3 import java.util.HashSet;
4 import java.util.Iterator;
9 public class NodeTupleSet {
11 private Set<NTuple<Descriptor>> set;
13 public NodeTupleSet() {
14 set = new HashSet<NTuple<Descriptor>>();
17 public void addTuple(NTuple<Descriptor> tuple) {
19 // need to add additional elements because we need to create edges even from
21 // for example, if we have input <a,b,c>, we need to add additional element
22 // <a,b> and <a> to the set
24 // NTuple<Descriptor> cur = new NTuple<Descriptor>();
25 // for (int i = 0; i < tuple.size(); i++) {
26 // Descriptor d = tuple.get(i);
28 // set.add(new NTuple<Descriptor>(cur));
34 public Iterator<NTuple<Descriptor>> iterator() {
35 return set.iterator();
38 public String toString() {
39 return set.toString();
42 public Set<NTuple<Descriptor>> getSet() {
46 public void addTupleSet(NodeTupleSet in) {
48 set.addAll(in.getSet());