ptolemy.data.type
Class RecordType.FieldType

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

private class RecordType.FieldType
extends java.lang.Object
implements InequalityTerm


Field Summary
private  Type _declaredType
           
private  Type _resolvedType
           
 
Constructor Summary
private RecordType.FieldType(Type declaredType)
           
 
Method Summary
 java.lang.Object getAssociatedObject()
          Return this RecordType.
 java.lang.Object getValue()
          Return the resolved type.
 InequalityTerm[] getVariables()
          Return this FieldType in an array if it 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 this field 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
 

Field Detail

_declaredType

private Type _declaredType

_resolvedType

private Type _resolvedType
Constructor Detail

RecordType.FieldType

private RecordType.FieldType(Type declaredType)
Method Detail

getAssociatedObject

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

Specified by:
getAssociatedObject in interface InequalityTerm
Returns:
a RecordType.

getValue

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

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

getVariables

public InequalityTerm[] getVariables()
Return this FieldType in an array if it 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 not settable, or the argument is not a Type.

isSettable

public boolean isSettable()
Test if this field type is a type variable.

Specified by:
isSettable in interface InequalityTerm
Returns:
True if this field 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 field type.
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.