Class OperatorFunction

  • All Implemented Interfaces:
    IFunction

    public class OperatorFunction
    extends java.lang.Object
    implements IFunction
    Wrapper that allows operators being used as functions.
    • Field Detail

      • operator

        protected IOperator operator
        The operator.
    • Constructor Detail

      • OperatorFunction

        public OperatorFunction​(IOperator operator)
        Create create new function.
    • Method Detail

      • invoke

        public java.lang.Object invoke​(java.lang.Object[] paramvalues,
                                       IOAVState state)
        Invoke a function and return a value (optional).
        Specified by:
        invoke in interface IFunction
        Parameters:
        paramvalues - The parameter values.
        state - The state.
        Returns:
        The function value.
      • getReturnType

        public java.lang.Class getReturnType()
        Get the return type of this function.
        Specified by:
        getReturnType in interface IFunction
      • getRelevantAttributes

        public AttributeSet getRelevantAttributes()
        Get the set of relevant attribute types.
        Specified by:
        getRelevantAttributes in interface IFunction
        Returns:
        The relevant attribute types.
      • getOperator

        public IOperator getOperator()
        Get the operator.
        Returns:
        The operator.
      • toString

        public java.lang.String toString()
        Get the string representation.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The string representation.
      • equals

        public boolean equals​(java.lang.Object obj)
        Test for equality.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - The object.
        Returns:
        True if operator.
      • hashCode

        public int hashCode()
        Get the hash code.
        Overrides:
        hashCode in class java.lang.Object