package org.zwobble.couscous.interpreter.values; import org.zwobble.couscous.types.Type; import org.zwobble.couscous.interpreter.Environment; import java.util.List; import java.util.function.BiFunction; public final class MethodValue implements Callable { private final List argumentTypes; private final BiFunction, InterpreterValue> apply; public InterpreterValue apply(Environment environment, MethodCallArguments arguments) { return apply.apply(environment, arguments); } public MethodValue(final List argumentTypes, final BiFunction, InterpreterValue> apply) { this.argumentTypes = argumentTypes; this.apply = apply; } public List getArgumentTypes() { return this.argumentTypes; } }