|
GridGain 3.6.0e
Enterprise Edition |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gridgain.grid.lang.GridMetadataAwareAdapter
org.gridgain.grid.lang.GridLambdaAdapter
org.gridgain.grid.lang.GridClosure2<E1,E2,R>
E1 - Type of the first free variable, i.e. the element the closure is called or closed on.E2 - Type of the second free variable, i.e. the element the closure is called or closed on.R - Type of the closure's return value.public abstract class GridClosure2<E1,E2,R>
Defines generic for-each type of closure. Closure is a first-class function that is defined with
(or closed over) its free variables that are bound to the closure scope at execution. Since
Java 6 doesn't provide a language construct for first-class function the closures are implemented
as abstract classes.
C2 class or various factory methods in
GridFunc class. Note, however, that since typedefs in Java rely on inheritance you should
not use these type aliases in signatures.
| Wiki | |
| Forum |
C2,
GridFunc,
Serialized Form
![]() |
![]() |
| Constructor Summary | |
|---|---|
GridClosure2()
|
|
| Method Summary | ||
|---|---|---|
|
andThen(GridClosure<R,A> c)
Gets closure that applies given closure over the result of this closure. |
|
GridInClosure2<E1,E2> |
andThen(GridInClosure<R> c)
Gets closure that applies given closure over the result of this closure. |
|
abstract R |
apply(E1 e1,
E2 e2)
Closure body. |
|
GridClosure<E2,R> |
curry(E1 e1)
Curries this closure with given value. |
|
GridOutClosure<R> |
curry(E1 e1,
E2 e2)
Curries this closure with given values. |
|
|
uncurry3()
Gets closure that ignores its third argument and returns the same value as this closure with first and second arguments. |
|
| Methods inherited from class org.gridgain.grid.lang.GridLambdaAdapter |
|---|
classLoader, deployClass, peerDeployLike, withMeta |
| Methods inherited from class org.gridgain.grid.lang.GridMetadataAwareAdapter |
|---|
addMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, clone, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, putMetaIfAbsent, readExternalMeta, removeMeta, removeMeta, replaceMeta, writeExternalMeta |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.gridgain.grid.GridMetadataAware |
|---|
addMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, putMetaIfAbsent, removeMeta, removeMeta, replaceMeta |
| Constructor Detail |
|---|
public GridClosure2()
| Method Detail |
|---|
public abstract R apply(E1 e1,
E2 e2)
e1 - First bound free variable, i.e. the element the closure is called or closed on.e2 - Second bound free variable, i.e. the element the closure is called or closed on.
public GridClosure<E2,R> curry(E1 e1)
e1 - Value to curry with.
public GridOutClosure<R> curry(E1 e1, E2 e2)
e1 - Value to curry with.e2 - Value to curry with.
public <E3> GridClosure3<E1,E2,E3,R> uncurry3()
E3 - Type of 3d argument that is ignored.
public <A> GridClosure2<E1,E2,A> andThen(GridClosure<R,A> c)
this closure.
A - Return type of new closure.c - Closure.
public GridInClosure2<E1,E2> andThen(GridInClosure<R> c)
this closure.
c - Closure.
|
GridGain 3.6.0e
Enterprise Edition |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
|
GridGain - Real Time Big Data
|
|
|