View Javadoc

1   // Universe.java, created Jul 1, 2004 11:01:59 PM by joewhaley
2   // Copyright (C) 2004 John Whaley <jwhaley@alum.mit.edu>
3   // Licensed under the terms of the GNU LGPL; see COPYING for details.
4   package net.sf.bddbddb.ir.highlevel;
5   
6   import java.util.Collections;
7   import java.util.List;
8   import net.sf.bddbddb.Relation;
9   import net.sf.bddbddb.ir.Operation;
10  
11  /***
12   * Universe
13   * 
14   * @author John Whaley
15   * @version $Id: Universe.java 328 2004-10-16 02:45:30Z joewhaley $
16   */
17  public class Universe extends HighLevelOperation {
18      Relation r0;
19  
20      /***
21       * @param r0
22       */
23      public Universe(Relation r0) {
24          super();
25          this.r0 = r0;
26      }
27  
28      /*
29       * (non-Javadoc)
30       * 
31       * @see net.sf.bddbddb.ir.Operation#visit(net.sf.bddbddb.ir.HighLevelOperationVisitor)
32       */
33      public Object visit(HighLevelOperationVisitor i) {
34          return i.visit(this);
35      }
36  
37      /*
38       * (non-Javadoc)
39       * 
40       * @see java.lang.Object#toString()
41       */
42      public String toString() {
43          return r0.toString() + " = universe()";
44      }
45  
46      /*
47       * (non-Javadoc)
48       * 
49       * @see net.sf.bddbddb.ir.Operation#getExpressionString()
50       */
51      public String getExpressionString() {
52          return "universe()";
53      }
54  
55      /*
56       * (non-Javadoc)
57       * 
58       * @see net.sf.bddbddb.ir.Operation#getDest()
59       */
60      public Relation getRelationDest() {
61          return r0;
62      }
63  
64      /*
65       * (non-Javadoc)
66       * 
67       * @see net.sf.bddbddb.ir.Operation#getSrcs()
68       */
69      public List getSrcs() {
70          return Collections.EMPTY_LIST;
71      }
72  
73      /*
74       * (non-Javadoc)
75       * 
76       * @see net.sf.bddbddb.ir.Operation#copy()
77       */
78      public Operation copy() {
79          return new Universe(r0);
80      }
81  
82      /*
83       * (non-Javadoc)
84       * 
85       * @see net.sf.bddbddb.ir.Operation#replaceSrc(net.sf.bddbddb.Relation,
86       *      net.sf.bddbddb.Relation)
87       */
88      public void replaceSrc(Relation r_old, Relation r_new) {
89      }
90  
91      /*
92       * (non-Javadoc)
93       * 
94       * @see net.sf.bddbddb.ir.Operation#setRelationDest(net.sf.bddbddb.Relation)
95       */
96      public void setRelationDest(Relation r0) {
97          this.r0 = r0;
98      }
99  }