|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ptolemy.data.type.TypeConstant
public class TypeConstant
An InequalityTerm that encapsulates a constant type. The constant type is specified in the constructor. This class represents a constant term in an inequality constraint for type resolution.
InequalityTerm
Red (cxh) |
Red (yuhong) |
Field Summary | |
---|---|
private Type |
_type
|
Constructor Summary | |
---|---|
TypeConstant(Type type)
Construct a TypeConstant. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object object)
Override to return true if the type is the same in this object as the specified object. |
java.lang.Object |
getAssociatedObject()
Return null. |
java.lang.Object |
getValue()
Return the constant type represented by this term. |
InequalityTerm[] |
getVariables()
Return an array of size zero. |
int |
hashCode()
Return the hashCode of the type. |
void |
initialize(java.lang.Object e)
Throw an Exception since type constant cannot be initialized. |
boolean |
isSettable()
Return false since this term represent a constant. |
boolean |
isValueAcceptable()
Check whether the current type of this term is acceptable, and return true if it is. |
void |
setValue(java.lang.Object e)
Throw IllegalActionException since the value of this term cannot be changed. |
java.lang.String |
toString()
Return a string representation of this term. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private Type _type
Constructor Detail |
---|
public TypeConstant(Type type)
type
- An instance of Type.Method Detail |
---|
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- The object to compare against.
public java.lang.Object getAssociatedObject()
getAssociatedObject
in interface InequalityTerm
public java.lang.Object getValue()
getValue
in interface InequalityTerm
setValue(Object)
public InequalityTerm[] getVariables()
getVariables
in interface InequalityTerm
public int hashCode()
hashCode
in class java.lang.Object
public void initialize(java.lang.Object e) throws IllegalActionException
initialize
in interface InequalityTerm
e
- An Object representing an element in the underlying CPO.
IllegalActionException
- Always thrown.public boolean isSettable()
isSettable
in interface InequalityTerm
public boolean isValueAcceptable()
isValueAcceptable
in interface InequalityTerm
public void setValue(java.lang.Object e) throws IllegalActionException
setValue
in interface InequalityTerm
e
- An Object representing an element in the
underlying CPO.
IllegalActionException
- Always thrown.getValue()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |