Package ptolemy.graph

Interface InequalityTerm

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object getAssociatedObject()
      Return the Object associated with this term.
      java.lang.Object getValue()
      Return the value of this term.
      InequalityTerm[] getVariables()
      Return an array of variables contained in this term.
      void initialize​(java.lang.Object e)
      Initialize the value of this term to the specified CPO element.
      boolean isSettable()
      Check whether this term can be set to a specific element of the underlying CPO.
      boolean isValueAcceptable()
      Check whether the current value of this term is acceptable, and return true if it is.
      void setValue​(java.lang.Object e)
      Set the value of this term to the specified CPO element.
    • Method Detail

      • getAssociatedObject

        java.lang.Object getAssociatedObject()
        Return the Object associated with this term. If this term is not associated with a particular Object, or it is not necessary to obtain the reference of the associated Object, this method can return null.
        Returns:
        The associated Object.
      • getValue

        java.lang.Object getValue()
                           throws IllegalActionException
        Return the value of this term. If this term is a constant, return that constant; if this term is a variable, return the current value of that variable; if this term is a function, return the evaluation of that function based on the current value of variables in the function.
        Returns:
        An Object representing an element in the underlying CPO.
        Throws:
        IllegalActionException - If the value of this inequality term is not valid.
        See Also:
        setValue(Object)
      • getVariables

        InequalityTerm[] getVariables()
        Return an array of variables contained in this term. If this term is a constant, return an array of size zero; if this term is a variable, return an array of size one that contains this variable; if this term is a function, return an array containing all the variables in the function.
        Returns:
        An array of InequalityTerms
      • initialize

        void initialize​(java.lang.Object e)
                 throws IllegalActionException
        Initialize the value of this term to the specified CPO element. If this InequalityTerm is a simple variable that can be set to any CPO element, set the value of the variable to the specified argument. In this case, this method is equivalent to setValue() with the same argument. In some applications, this term is a structured object that only part of it is a simple variable. In this case, set that variable part to the specified argument.
        Parameters:
        e - An Object representing an element in the underlying CPO.
        Throws:
        IllegalActionException - If this term is not a variable.
      • isSettable

        boolean isSettable()
        Check whether this term can be set to a specific element of the underlying CPO. Only variable terms are settable, constant and function terms are not.
        Returns:
        True if this term is a variable; false otherwise.
      • isValueAcceptable

        boolean isValueAcceptable()
        Check whether the current value of this term is acceptable, and return true if it is.
        Returns:
        True if the current value is acceptable.
      • setValue

        void setValue​(java.lang.Object e)
               throws IllegalActionException
        Set the value of this term to the specified CPO element. Only terms consisting of a single variable can have their values set.
        Parameters:
        e - An Object representing an element in the underlying CPO.
        Throws:
        IllegalActionException - If this term is not a variable.
        See Also:
        getValue()