Package ptolemy.actor.util
Class ConstructAssociativeType
- java.lang.Object
- 
- ptolemy.data.type.MonotonicFunction
- 
- ptolemy.actor.util.ConstructAssociativeType
 
 
- 
- All Implemented Interfaces:
- InequalityTerm
 
 public class ConstructAssociativeType extends MonotonicFunction A function that, given a list of ports, returns aStructuredTypeof which the fields names and field types correspond with the given ports. The arguments to this function (the array returned by getVariables()) represent the types of the ports, in the same order as the ports are defined. The concrete subclass ofStructuredTypethat is to be instantiated by this function depends on the type parameter passed to the constructor.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Edward A. Lee, Marten Lohstroh
- Pt.AcceptedRating:
- Red
- Pt.ProposedRating:
- Red (marten)
 
- 
- 
Constructor SummaryConstructors Constructor Description ConstructAssociativeType(java.util.Collection<TypedIOPort> ports, java.lang.Class<? extends AssociativeType> type)Construct a new monotonic function.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetValue()Return a RecordType with field names equal to the given port names, and field types equal to the current inferred or declared type of the corresponding ports.InequalityTerm[]getVariables()Return the type variables for this function, which are the type variables for all the ports that do not have declared types.- 
Methods inherited from class ptolemy.data.type.MonotonicFunctiongetAssociatedObject, getVerboseString, initialize, isSettable, isValueAcceptable, setValue, toString
 
- 
 
- 
- 
- 
Constructor Detail- 
ConstructAssociativeTypepublic ConstructAssociativeType(java.util.Collection<TypedIOPort> ports, java.lang.Class<? extends AssociativeType> type) Construct a new monotonic function.- Parameters:
- ports- A list of ports used to construct the AssociativeType
- type- A specific subclass to instantiate
 
 
- 
 - 
Method Detail- 
getValuepublic java.lang.Object getValue() throws IllegalActionExceptionReturn a RecordType with field names equal to the given port names, and field types equal to the current inferred or declared type of the corresponding ports.- Specified by:
- getValuein interface- InequalityTerm
- Specified by:
- getValuein class- MonotonicFunction
- Returns:
- A RecordType.
- Throws:
- IllegalActionException- If thrown while getting the value of the typeTerm of the port or while instantiating a type.
- See Also:
- MonotonicFunction.setValue(Object)
 
 - 
getVariablespublic InequalityTerm[] getVariables() Return the type variables for this function, which are the type variables for all the ports that do not have declared types.- Specified by:
- getVariablesin interface- InequalityTerm
- Specified by:
- getVariablesin class- MonotonicFunction
- Returns:
- An array of InequalityTerm.
 
 
- 
 
-