chord.bddbddb
Class Dom<T>

java.lang.Object
  extended by chord.util.IndexMap<T>
      extended by chord.bddbddb.Dom<T>
Type Parameters:
T - The type of values in the domain.
All Implemented Interfaces:
java.lang.Iterable<T>
Direct Known Subclasses:
ProgramDom

public class Dom<T>
extends IndexMap<T>

Generic implementation of a BDD-based domain.

Typical usage is as follows:

Author:
Mayur Naik (mhn@cs.stanford.edu)

Field Summary
protected  java.lang.String name
           
 
Fields inherited from class chord.util.IndexMap
hmap, list
 
Constructor Summary
Dom()
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getName()
           
 int hashCode()
           
 void print()
          Prints the values in the domain in memory to the standard output stream.
 void print(java.io.PrintStream out)
          Prints the values in the domain in memory to the specified output stream.
 void save(java.lang.String dirName, boolean saveDomMap)
          Reflects the domain in memory onto disk.
 void setName(java.lang.String name)
           
 java.lang.String toUniqueString(int idx)
           
 java.lang.String toUniqueString(T val)
           
 
Methods inherited from class chord.util.IndexMap
add, addAll, clear, contains, get, getOrAdd, indexOf, iterator, size
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
Constructor Detail

Dom

public Dom()
Method Detail

setName

public void setName(java.lang.String name)

getName

public java.lang.String getName()

save

public void save(java.lang.String dirName,
                 boolean saveDomMap)
          throws java.io.IOException
Reflects the domain in memory onto disk.

Throws:
java.io.IOException

toUniqueString

public java.lang.String toUniqueString(T val)

toUniqueString

public java.lang.String toUniqueString(int idx)

print

public void print()
Prints the values in the domain in memory to the standard output stream.


print

public void print(java.io.PrintStream out)
Prints the values in the domain in memory to the specified output stream.

Parameters:
out - The output stream to which the values in the domain in memory must be printed.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object