Package net.hydromatic.morel.eval
Class Applicable3<R,A0,A1,A2>
java.lang.Object
net.hydromatic.morel.eval.ApplicableImpl
net.hydromatic.morel.eval.Applicable3<R,A0,A1,A2>
- Type Parameters:
R- return typeA0- type of argument 0A1- type of argument 1A2- type of argument 2
- All Implemented Interfaces:
Applicable,Describable
- Direct Known Subclasses:
Codes.StringExtract,Codes.StringSubstring,Codes.VectorUpdate
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:
-
Field Summary
Fields inherited from class net.hydromatic.morel.eval.ApplicableImpl
pos -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedApplicable3(BuiltIn builtIn) protectedApplicable3(BuiltIn builtIn, Pos pos) -
Method Summary
Methods inherited from class net.hydromatic.morel.eval.ApplicableImpl
describe, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.hydromatic.morel.eval.Applicable
asCode
-
Constructor Details
-
Applicable3
-
Applicable3
-
-
Method Details
-
apply
-
apply
-