Interface Lambda
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
Lambda.AbstractLambda
,Lambda.BinaryLambda
,Lambda.OneArgLambda
,Lambda.TwoArgLambda
,Lambda.UnaryLambda
,Lambda.UnknownArgLambda
,Lambda.ZeroArgLambda
public interface Lambda extends Serializable
Provides a way to serialize string lambdas as scripts which can be evaluated by aGremlinScriptEngine
.- Author:
- Marko A. Rodriguez (http://markorodriguez.com), Stephen Mallette (http://stephen.genoprime.com)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Lambda.AbstractLambda
static class
Lambda.BinaryLambda<A>
static class
Lambda.OneArgLambda<A,B>
static class
Lambda.TwoArgLambda<A,B,C>
static class
Lambda.UnaryLambda<A>
static class
Lambda.UnknownArgLambda
static class
Lambda.ZeroArgLambda<A>
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_LAMBDA_LANGUAGE
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <A,B,C>
BiFunction<A,B,C>biFunction(String lambdaSource)
static <A,B,C>
BiFunction<A,B,C>biFunction(String lambdaSource, String lambdaLanguage)
static <A> BinaryOperator<A>
binaryOperator(String lambdaSource)
static <A> Comparator<A>
comparator(String lambdaSource)
static <A> Comparator<A>
comparator(String lambdaSource, String lambdaLanguage)
static <A> Consumer<A>
consumer(String lambdaSource)
static <A> Consumer<A>
consumer(String lambdaSource, String lambdaLanguage)
static <A,B>
Function<A,B>function(String lambdaSource)
static <A,B>
Function<A,B>function(String lambdaSource, String lambdaLanguage)
int
getLambdaArguments()
String
getLambdaLanguage()
String
getLambdaScript()
static <A> Predicate<A>
predicate(String lambdaSource)
static <A> Predicate<A>
predicate(String lambdaSource, String lambdaLanguage)
static <A> Supplier<A>
supplier(String lambdaSource)
static <A> Supplier<A>
supplier(String lambdaSource, String lambdaLanguage)
static <A> UnaryOperator<A>
unaryOperator(String lambdaSource)
static <A> UnaryOperator<A>
unaryOperator(String lambdaSource, String lambdaLanguage)
-
-
-
Field Detail
-
DEFAULT_LAMBDA_LANGUAGE
static final String DEFAULT_LAMBDA_LANGUAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getLambdaScript
String getLambdaScript()
-
getLambdaLanguage
String getLambdaLanguage()
-
getLambdaArguments
int getLambdaArguments()
-
unaryOperator
static <A> UnaryOperator<A> unaryOperator(String lambdaSource, String lambdaLanguage)
-
comparator
static <A> Comparator<A> comparator(String lambdaSource, String lambdaLanguage)
-
biFunction
static <A,B,C> BiFunction<A,B,C> biFunction(String lambdaSource, String lambdaLanguage)
-
unaryOperator
static <A> UnaryOperator<A> unaryOperator(String lambdaSource)
-
comparator
static <A> Comparator<A> comparator(String lambdaSource)
-
biFunction
static <A,B,C> BiFunction<A,B,C> biFunction(String lambdaSource)
-
binaryOperator
static <A> BinaryOperator<A> binaryOperator(String lambdaSource)
-
-