A
- the Map
element typepublic final class LambdaMap<A,B> extends Object implements Functor<B,LambdaMap<A,?>>, Traversable<B,LambdaMap<A,?>>
LambdaIterable
Modifier and Type | Method and Description |
---|---|
static <A,B> LambdaMap<A,B> |
empty()
Construct an empty
LambdaMap by wrapping Collections.emptyMap() |
boolean |
equals(Object other) |
<C> LambdaMap<A,C> |
fmap(Fn1<? super B,? extends C> fn)
Covariantly transmute this functor's parameter using the given mapping function.
|
int |
hashCode() |
String |
toString() |
<C,App extends Applicative<?,App>,TravC extends Traversable<C,LambdaMap<A,?>>,AppTrav extends Applicative<TravC,App>> |
traverse(Fn1<? super B,? extends Applicative<C,App>> fn,
Fn1<? super TravC,? extends AppTrav> pure)
Apply
fn to each element of this traversable from left to right, and collapse the results into
a single resulting applicative, potentially with the assistance of the applicative's pure function. |
Map<A,B> |
unwrap()
Unwrap the underlying
Map . |
static <A,B> LambdaMap<A,B> |
wrap(Map<A,B> map)
|
public <C> LambdaMap<A,C> fmap(Fn1<? super B,? extends C> fn)
Functor
public <C,App extends Applicative<?,App>,TravC extends Traversable<C,LambdaMap<A,?>>,AppTrav extends Applicative<TravC,App>> AppTrav traverse(Fn1<? super B,? extends Applicative<C,App>> fn, Fn1<? super TravC,? extends AppTrav> pure)
Traversable
fn
to each element of this traversable from left to right, and collapse the results into
a single resulting applicative, potentially with the assistance of the applicative's pure function.traverse
in interface Traversable<B,LambdaMap<A,?>>
C
- the resulting element typeApp
- the result applicative typeTravC
- this Traversable instance over BAppTrav
- the full inferred resulting type from the traversalfn
- the function to applypure
- the applicative pure functionpublic static <A,B> LambdaMap<A,B> empty()
LambdaMap
by wrapping Collections.emptyMap()
A
- the key typeB
- the value typeLambdaMap