|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.data.type.StructuredType
Base class for structured type. Making this an abstract class (not an interface) allows the methods to be protected. All the types of the same structured type (e.g. all the array types) must form a lattice. Each instance of a structured type must know how to compare itself with another instance of the same structured type, and compute the least upper bound and greatest lower bound. This class defines methods for these operations.
Subclasses should override clone() to do a deep cloning.
| Red (cxh) |
| Red (yuhong) |
| Field Summary |
| Fields inherited from interface ptolemy.data.type.Type |
HASH_INVALID, HASH_MAX |
| Constructor Summary | |
StructuredType()
|
|
| Method Summary | |
protected abstract int |
_compare(StructuredType type)
Compare this type with the specified type. |
protected abstract StructuredType |
_getRepresentative()
Return a static instance of this structured type. |
protected abstract StructuredType |
_greatestLowerBound(StructuredType type)
Return the greatest lower bound of this type with the specified type. |
protected abstract StructuredType |
_leastUpperBound(StructuredType type)
Return the least upper bound of this type with the specified type. |
abstract java.lang.Object |
clone()
Return a deep copy of this StructuredType. |
int |
getTypeHash()
Return a perfect hash for this type. |
abstract void |
initialize(Type type)
Set the elements that have declared type BaseType.UNKNOWN to the specified type. |
abstract void |
updateType(StructuredType newType)
Update this StructuredType to the specified Structured Type. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface ptolemy.data.type.Type |
convert, equals, getTokenClass, isCompatible, isConstant, isInstantiable, isSubstitutionInstance, toString |
| Constructor Detail |
public StructuredType()
| Method Detail |
public abstract java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface Typejava.lang.CloneNotSupportedException - Not thrown in this base class.public int getTypeHash()
getTypeHash in interface Typepublic abstract void initialize(Type type)
type - A Type.
public abstract void updateType(StructuredType newType)
throws IllegalActionException
newType - A StructuredType.
IllegalActionException - If the specified type has a
different structure.protected abstract int _compare(StructuredType type)
type - a StructuredType.
java.lang.IllegalArgumentException - If the specified type is
not the same structured type as this one.protected abstract StructuredType _getRepresentative()
protected abstract StructuredType _greatestLowerBound(StructuredType type)
type - a StructuredType.
java.lang.IllegalArgumentException - If the specified type is
not the same structured type as this one.protected abstract StructuredType _leastUpperBound(StructuredType type)
type - a StructuredType.
java.lang.IllegalArgumentException - If the specified type is
not the same structured type as this one.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||