Interface Typeable

    • Method Detail

      • getType

        Type getType()
              throws IllegalActionException
        Return the type of this object. An exception is thrown if the type cannot be determined. This can happen if the type of this object is dependent on some other objects whose value is not available yet.
        Returns:
        An instance of Type.
        Throws:
        IllegalActionException - If the type cannot be determined.
      • getTypeTerm

        InequalityTerm getTypeTerm()
        Return an InequalityTerm representing this object.
        Returns:
        An InequalityTerm.
      • isTypeAcceptable

        boolean isTypeAcceptable()
        Check whether the type of this object is acceptable.
        Returns:
        True if the type of this object is acceptable.
      • setTypeAtLeast

        void setTypeAtLeast​(Typeable lesser)
        Constrain the type of this object to be equal to or greater than the type of the argument. Notice that this constraint is not enforced until type resolution is done, and is not enforced if type resolution is not done.
        Parameters:
        lesser - A Typeable object.
      • setTypeAtLeast

        void setTypeAtLeast​(InequalityTerm typeTerm)
        Constrain the type of this object to be equal to or greater than the type represented by the specified InequalityTerm. Notice that this constraint is not enforced until type resolution is done, and is not enforced if type resolution is not done.
        Parameters:
        typeTerm - An InequalityTerm object.
      • setTypeAtMost

        void setTypeAtMost​(Type type)
                    throws IllegalActionException
        Constrain the type of this object to be equal to or less than the argument. Because the argument is a concrete type, rather than a Typeable object (which may not yet have a type), the constraint is immediately enforced.
        Parameters:
        type - An instance of Type.
        Throws:
        IllegalActionException - If the type of this object already violates this constraint.
      • setTypeEquals

        void setTypeEquals​(Type type)
                    throws IllegalActionException
        Set a type constraint that the type of this object equal the specified value.
        Parameters:
        type - An instance of Type.
        Throws:
        IllegalActionException - If the type of this object already violates this constraint.
      • setTypeSameAs

        void setTypeSameAs​(Typeable equal)
        Constrain the type of this object to be the same as the type of the argument. Notice that this constraint is not enforced until type resolution is done, and is not enforced if type resolution is not done.
        Parameters:
        equal - The type that this object should be the same as.