Package ptolemy.actor.util
Class ArrayElementTypeFunction
- java.lang.Object
-
- ptolemy.data.type.MonotonicFunction
-
- ptolemy.actor.util.ArrayElementTypeFunction
-
- All Implemented Interfaces:
InequalityTerm
public class ArrayElementTypeFunction extends MonotonicFunction
This class implements a monotonic function that returns the element type of its argument, if the argument is an array type. If the argument is general, then it returns general. Otherwise, it return unknown.- Since:
- Ptolemy II 10.0
- Version:
- $Id: ArrayElementTypeFunction.java$
- Author:
- Edward A. Lee
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (eal)
-
-
Constructor Summary
Constructors Constructor Description ArrayElementTypeFunction(Typeable typeable)
Construct a ArrayElementTypeFunction whose argument is the type of the specified object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getValue()
Return the current value of this monotonic function.InequalityTerm[]
getVariables()
Return the type variables for this function, which is the type term of the specified typeable, unless it has a constant type, in which case return an empty array.-
Methods inherited from class ptolemy.data.type.MonotonicFunction
getAssociatedObject, getVerboseString, initialize, isSettable, isValueAcceptable, setValue, toString
-
-
-
-
Constructor Detail
-
ArrayElementTypeFunction
public ArrayElementTypeFunction(Typeable typeable)
Construct a ArrayElementTypeFunction whose argument is the type of the specified object.- Parameters:
typeable
- A Typeable object.
-
-
Method Detail
-
getValue
public java.lang.Object getValue() throws IllegalActionException
Return the current value of this monotonic function.- Specified by:
getValue
in interfaceInequalityTerm
- Specified by:
getValue
in classMonotonicFunction
- Returns:
- A Type.
- Throws:
IllegalActionException
- If the type of the argument cannot be determined.- See Also:
MonotonicFunction.setValue(Object)
-
getVariables
public InequalityTerm[] getVariables()
Return the type variables for this function, which is the type term of the specified typeable, unless it has a constant type, in which case return an empty array.- Specified by:
getVariables
in interfaceInequalityTerm
- Specified by:
getVariables
in classMonotonicFunction
- Returns:
- An array of InequalityTerms.
-
-