View Javadoc

1   /*
2    * Created on Jul 6, 2004
3    * 
4    * TODO To change the template for this generated file go to Window -
5    * Preferences - Java - Code Style - Code Templates
6    */
7   package net.sf.bddbddb.dataflow;
8   
9   import jwutil.math.BitString;
10  import net.sf.bddbddb.IterationList;
11  
12  /***
13   * BitVectorFact
14   * 
15   * @author Collective
16   * @version $Id: BitVectorFact.java 328 2004-10-16 02:45:30Z joewhaley $
17   */
18  public abstract class BitVectorFact implements Problem.Fact {
19      protected final BitString fact;
20  
21      IterationList location;
22      
23      public void setLocation(IterationList list) {
24          location = list;
25      }
26  
27      public IterationList getLocation() {
28          return location;
29      }
30  
31      protected BitVectorFact(int setSize) {
32          fact = new BitString(setSize);
33      }
34  
35      protected BitVectorFact(BitString s) {
36          this.fact = s;
37      }
38  
39      /* (non-Javadoc)
40       * @see java.lang.Object#equals(java.lang.Object)
41       */
42      public boolean equals(Object o) {
43          if (o instanceof BitVectorFact) {
44              return this.fact.equals(((BitVectorFact) o).fact);
45          }
46          return false;
47      }
48      
49      /* (non-Javadoc)
50       * @see java.lang.Object#hashCode()
51       */
52      public int hashCode() {
53          return this.fact.hashCode();
54      }
55      
56      public String toString() {
57          return fact.toString();
58      }
59  }