All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.basking2.sdsai.itrex.functions.function.ArgFunction Maven / Gradle / Ivy

There is a newer version: 1.1.23
Show newest version
package com.github.basking2.sdsai.itrex.functions.function;

import com.github.basking2.sdsai.itrex.EvaluationContext;
import com.github.basking2.sdsai.itrex.functions.FunctionInterface;

import java.util.Iterator;

/**
 * Fetch an argument from the current context.
 */
public class ArgFunction implements FunctionInterface {

    @Override
    public Object apply(final Iterator iterator, final EvaluationContext evaluationContext) {
        return evaluationContext.getArguments().next();
    }
}