ptolemy.data.type
Class ArrayType.ElementTypeTerm

java.lang.Object
  extended by ptolemy.data.type.ArrayType.ElementTypeTerm
All Implemented Interfaces:
InequalityTerm
Enclosing class:
ArrayType

private class ArrayType.ElementTypeTerm
extends java.lang.Object
implements InequalityTerm

An InequalityTerm associated with an instance of ArrayType.


Constructor Summary
private ArrayType.ElementTypeTerm()
           
 
Method Summary
 java.lang.Object getAssociatedObject()
          Return this ArrayType.
 java.lang.Object getValue()
          Return the element type.
 InequalityTerm[] getVariables()
          Return this ElementTypeTerm in an array if this term represents a type variable.
 void initialize(java.lang.Object e)
          Reset the variable part of the element type to the specified type.
 boolean isSettable()
          Test if the element type is a type variable.
 boolean isValueAcceptable()
          Check whether the current element type is acceptable.
 void setValue(java.lang.Object e)
          Set the element type to the specified type.
 java.lang.String toString()
          Return a string representation of this term.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArrayType.ElementTypeTerm

private ArrayType.ElementTypeTerm()
Method Detail

getAssociatedObject

public java.lang.Object getAssociatedObject()
Return this ArrayType.

Specified by:
getAssociatedObject in interface InequalityTerm
Returns:
an ArrayType.

getValue

public java.lang.Object getValue()
Return the element type.

Specified by:
getValue in interface InequalityTerm
Returns:
a Type.
See Also:
InequalityTerm.setValue(Object)

getVariables

public InequalityTerm[] getVariables()
Return this ElementTypeTerm in an array if this term represents a type variable. Otherwise, return an array of size zero.

Specified by:
getVariables in interface InequalityTerm
Returns:
An array of InequalityTerm.

initialize

public void initialize(java.lang.Object e)
                throws IllegalActionException
Reset the variable part of the element type to the specified type.

Specified by:
initialize in interface InequalityTerm
Parameters:
e - A Type.
Throws:
IllegalActionException - If this type is a constant, or the argument is not a Type.

isSettable

public boolean isSettable()
Test if the element type is a type variable.

Specified by:
isSettable in interface InequalityTerm
Returns:
True if the element type is a type variable.

isValueAcceptable

public boolean isValueAcceptable()
Check whether the current element type is acceptable. The element type is acceptable if it represents an instantiable object.

Specified by:
isValueAcceptable in interface InequalityTerm
Returns:
True if the element type is acceptable.

setValue

public void setValue(java.lang.Object e)
              throws IllegalActionException
Set the element type to the specified type.

Specified by:
setValue in interface InequalityTerm
Parameters:
e - a Type.
Throws:
IllegalActionException - If the specified type violates the declared type of the element.
See Also:
InequalityTerm.getValue()

toString

public java.lang.String toString()
Return a string representation of this term.

Overrides:
toString in class java.lang.Object
Returns:
A String.