harpoon.Temp
Class TempFactory

java.lang.Object
  extended by harpoon.Temp.TempFactory
All Implemented Interfaces:
ReferenceUnique

public abstract class TempFactory
extends Object
implements ReferenceUnique

A TempFactory assigns unique identifiers to Temps within a given scope.

Version:
$Id: TempFactory.java,v 1.3 2004/02/08 01:59:47 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Constructor Summary
TempFactory()
           
 
Method Summary
abstract  String getScope()
          Returns the static scope of this TempFactory.
protected abstract  String getUniqueID(String suggestion)
          Returns a unique identifier within this scope.
 int hashCode()
          Return a hashcode for this TempFactory.
 String toString()
          Human-readable representation of TempFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TempFactory

public TempFactory()
Method Detail

getScope

public abstract String getScope()
Returns the static scope of this TempFactory. Should be unique among TempFactorys and invariant for a given TempFactory.


getUniqueID

protected abstract String getUniqueID(String suggestion)
Returns a unique identifier within this scope. Not required to be unique among all TempFactorys. Should be repeatable; that is, the n'th call to getUniqueID() with a given suggestion String for a given TempFactory should always return the same String.


toString

public String toString()
Human-readable representation of TempFactory

Overrides:
toString in class Object

hashCode

public int hashCode()
Return a hashcode for this TempFactory.

Overrides:
hashCode in class Object