public class TypeConstant extends java.lang.Object implements InequalityTerm
InequalityTerm
Red (cxh) |
Red (yuhong) |
Constructor and Description |
---|
TypeConstant(Type type)
Construct a TypeConstant.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public TypeConstant(Type type)
type
- An instance of Type.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