Class MultiplyOrDivideUnitConcepts


  • public class MultiplyOrDivideUnitConcepts
    extends ConceptFunction
    A concept function that returns the UnitConcept result of a multiplication or division operation between two UnitConcepts in a unit system ontology.
    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Charles Shelton
    Pt.AcceptedRating:
    Red (cshelton)
    Pt.ProposedRating:
    Green (cshelton)
    • Constructor Detail

      • MultiplyOrDivideUnitConcepts

        public MultiplyOrDivideUnitConcepts​(Ontology ontology,
                                            boolean isMultiply)
                                     throws IllegalActionException
        Create a new MultiplyOrDivideUnitConcepts concept function.
        Parameters:
        ontology - The domain and range unit system ontology for this concept function.
        isMultiply - Indicates whether this concept function will perform multiplication or division for the unit system concepts.
        Throws:
        IllegalActionException - Thrown if the concept function cannot be created.
    • Method Detail

      • _evaluateFunction

        protected Concept _evaluateFunction​(java.util.List<Concept> argValues)
                                     throws IllegalActionException
        Return the function output from the given input arguments. The output concept is a UnitConcept that is the result of multiplication or division of the two input UnitConcepts, or the top of the ontology lattice if there is no UnitConcept in the ontology that represents the product or quotient of the two input concepts.
        Specified by:
        _evaluateFunction in class ConceptFunction
        Parameters:
        argValues - The 2 UnitConcept input arguments.
        Returns:
        The output UnitConcept.
        Throws:
        IllegalActionException - Thrown if there is a problem creating the output UnitConcept.