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
public abstract class Applicable3<R,A0,A1,A2> extends ApplicableImpl
Applicable whose argument is a 3-tuple.Implementations that use
Applicable3are more efficient and concise thanApplicableImplbecause there is no need to create an ephemeral tuple (JavaList) 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
Applicable3implementation and the argument tuple is evaluated whole, the old evaluation path will be used.- See Also:
Applicable2
-
-
Field Summary
-
Fields inherited from class net.hydromatic.morel.eval.ApplicableImpl
pos
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedApplicable3(BuiltIn builtIn)protectedApplicable3(BuiltIn builtIn, Pos pos)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Rapply(A0 a0, A1 a1, A2 a2)Objectapply(EvalEnv env, Object argValue)-
Methods inherited from class net.hydromatic.morel.eval.ApplicableImpl
describe, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.hydromatic.morel.eval.Applicable
asCode
-
-