ilog.rules.factory

Class IlrBinaryValue

  • All Implemented Interfaces:
    java.io.Serializable


    public class IlrBinaryValue
    extends IlrValue
    This class represents a binary arithmetic expression of the rule language. The field kind specifies the kind of operation involved to compute the binary value, its possible values are defined in the interface IlrBinaryOperator. The binary operation itself is performed by an IlrBinaryOperator. An instance of this class determines its binary operator using the types of the arguments and the kind. If a binary operator can not be determined, the binary operation is not a valid expression.

    Warning: Serialized objects of this class will not be compatible with future releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of IBM Decision Server.

    See Also:
    Serialized Form
    • Constructor Detail

      • IlrBinaryValue

        public IlrBinaryValue(int kind,
                      IlrValue first,
                      IlrValue second)
        Constructs a binary expression from two values.
        Parameters:
        kind - The type of the binary operation as defined in IlrBinaryOperator.
        first - The first argument value.
        second - The second argument value.
    • Method Detail

      • getKind

        public int getKind()
        Gets the kind of the expression. The value is one of the constant values defined in IlrBinaryOperator.
        Returns:
        The kind of this expression.
      • setKind

        public void setKind(int kind)
        Sets the kind of this expression. The possible values are defined in IlrBinaryOperator.
        Parameters:
        kind - The kind of this expression.
      • getFirstArgument

        public IlrValue getFirstArgument()
        Gets the first argument of this expression.
        Returns:
        The first argument of this expression.
      • setFirstArgument

        public void setFirstArgument(IlrValue first)
        Changes the first argument of this expression.
        Parameters:
        first - The first argument of this expression.
      • getSecondArgument

        public IlrValue getSecondArgument()
        Gets the second argument of this expression.
        Returns:
        The second argument of this expression.
      • setSecondArgument

        public void setSecondArgument(IlrValue second)
        Changes the second argument of this expression.
        Parameters:
        second - The second argument of this expression.
      • getOperator

        public IlrBinaryOperator getOperator()
        Gets the binary operator that is used to compute the binary value. The binary operator is determined according to the argument types and the kind of operation.
        Returns:
        A binary operator, or null if the binary value is not valid.
      • exploreValue

        public java.lang.Object exploreValue(IlrFactoryExplorer explorer)
        Explores this binary value using a factory explorer and returns an object as a result.
        Specified by:
        exploreValue in class IlrValue
        Parameters:
        explorer - The factory explorer.
        Returns:
        An object which represents the result of the exploration, or null if the method does not return a value.

© Copyright IBM Corp. 1987, 2017