Interface Function

  • All Known Implementing Classes:
    NumericAdapter, StringFunctionAdapter

    public interface Function

    Title: Function

    Description: Interface for built-ins that can bind the first argument to a built-in atom to a new value.

    Copyright: Copyright (c) 2007

    Company: Clark & Parsia, LLC.

    Author:
    Ron Alford
    • Method Detail

      • apply

        Literal apply​(ABox abox,
                      Literal expected,
                      Literal... args)
        Apply the function against a set of arguments. Test the _expected argument against the result. Return null if the arguments were invalid. If '_expected' was not null and matched the result, return '_expected'. If '_expected' was not null and did not match, return null; Otherwise, return the result.
        Parameters:
        abox -
        expected -
        args -
        Returns:
        the literal that result of the application of the function again the Abox