Class Applicable3<R,​A0,​A1,​A2>

  • Type Parameters:
    R - return type
    A0 - type of argument 0
    A1 - type of argument 1
    A2 - type of argument 2
    All Implemented Interfaces:
    Applicable, Describable
    Direct Known Subclasses:
    Codes.StringExtract, Codes.StringSubstring, Codes.VectorUpdate

    public abstract class Applicable3<R,​A0,​A1,​A2>
    extends ApplicableImpl
    Applicable whose argument is a 3-tuple.

    Implementations that use Applicable3 are more efficient and concise than ApplicableImpl because there is no need to create an ephemeral tuple (Java List) to pass the arguments, and Java's generics provide the casting.

    But the rewrite assumes that the function is strict (always evaluates all arguments, even if the function throws) and doesn't use EvalEnv, so it is not appropriate for all functions.

    If a function has an Applicable3 implementation and the argument tuple is evaluated whole, the old evaluation path will be used.

    See Also:
    Applicable2
    • Constructor Detail

      • Applicable3

        protected Applicable3​(BuiltIn builtIn,
                              Pos pos)
      • Applicable3

        protected Applicable3​(BuiltIn builtIn)