ilog.rules.factory

Interface IlrUnaryOperator

  • All Superinterfaces:
    java.io.Serializable


    public interface IlrUnaryOperator
    extends java.io.Serializable
    This interface represents a unary operation performed by some classes of this API. A unary operation takes a datum or an object as input and returns an object as result. The type of the result is inferred from the type of the argument. Internally when an object of the factory API involving a unary operation is created, a unary operator is determined and attached to that object. The evaluate method can be used to perform the unary operation.
    See Also:
    IlrUnaryValue, IlrCastValue
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int CAST
      This integer constant represents a type cast.
      static int NEGATIVE
      This integer constant represents the application of the - operator to an expression.
      static int NOT
      This integer constant represents the application of the ! operator to a boolean expression.
      static int POSITIVE
      This integer constant represents the application of the + operator to an expression.
      static int POSTFIX_DECR
      This integer constant represents a postfixed decrement operator.
      static int POSTFIX_INCR
      This integer constant represents a postfixed increment operator.
      static int PREFIX_DECR
      This integer constant represents a prefixed decrement operator.
      static int PREFIX_INCR
      This integer constant represents a prefixed increment operator.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.lang.Object evaluate(java.lang.Object arg)
      Performs the unary operation.
      int getKind()
      Gets the kind of the unary operation.
      java.lang.Class getResultType()
      Gets the result type of the unary operation.
    • Field Detail

      • POSITIVE

        static final int POSITIVE
        This integer constant represents the application of the + operator to an expression.
        See Also:
        Constant Field Values
      • NEGATIVE

        static final int NEGATIVE
        This integer constant represents the application of the - operator to an expression.
        See Also:
        Constant Field Values
      • NOT

        static final int NOT
        This integer constant represents the application of the ! operator to a boolean expression.
        See Also:
        Constant Field Values
      • CAST

        static final int CAST
        This integer constant represents a type cast.
        See Also:
        Constant Field Values
      • PREFIX_INCR

        static final int PREFIX_INCR
        This integer constant represents a prefixed increment operator.
        See Also:
        Constant Field Values
      • PREFIX_DECR

        static final int PREFIX_DECR
        This integer constant represents a prefixed decrement operator.
        See Also:
        Constant Field Values
      • POSTFIX_INCR

        static final int POSTFIX_INCR
        This integer constant represents a postfixed increment operator.
        See Also:
        Constant Field Values
      • POSTFIX_DECR

        static final int POSTFIX_DECR
        This integer constant represents a postfixed decrement operator.
        See Also:
        Constant Field Values
    • Method Detail

      • getResultType

        java.lang.Class getResultType()
        Gets the result type of the unary operation.
        Returns:
        The result type of the unary operation. The returned type is never null.
      • getKind

        int getKind()
        Gets the kind of the unary operation. The kind of the operation is defined by the integer constants of this interface.
        Returns:
        The kind of the unary operation.
      • evaluate

        java.lang.Object evaluate(java.lang.Object arg)
        Performs the unary operation. The unary operation takes an object as parameter, and returns an object as result. If the argument is of primitive type, it should be wrapped using the wrapping class in order to use this method. If the result is a primitive type, it is also wrapped using the corresponding wrapping type.
        Parameters:
        arg - The argument of the operation.
        Returns:
        An object, result of the unary operation.

© Copyright IBM Corp. 1987, 2017