Class LambdaMap<A,B>
java.lang.Object
com.jnape.palatable.lambda.traversable.LambdaMap<A,B>
- Type Parameters:
A- theMapelement type
- All Implemented Interfaces:
Functor<B, LambdaMap<A,?>>, Traversable<B, LambdaMap<A, ?>>
public final class LambdaMap<A,B>
extends Object
implements Functor<B, LambdaMap<A,?>>, Traversable<B, LambdaMap<A,?>>
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <A,B> LambdaMap <A, B> empty()Construct an emptyLambdaMapby wrappingCollections.emptyMap()booleanCovariantly transmute this functor's parameter using the given mapping function.inthashCode()toString()<C, App extends Applicative<?,App>, TravC extends Traversable<C, LambdaMap<A, ?>>, AppTrav extends Applicative<TravC, App>>
AppTravtraverse(Fn1<? super B, ? extends Applicative<C, App>> fn, Fn1<? super TravC, ? extends AppTrav> pure) Applyfnto 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.unwrap()Unwrap the underlyingMap.static <A,B> LambdaMap <A, B>
-
Field Details
-
map
-
-
Constructor Details
-
LambdaMap
-
-
Method Details
-
unwrap
-
fmap
Description copied from interface:FunctorCovariantly transmute this functor's parameter using the given mapping function. Generally this method is specialized to return an instance of the class implementing Functor. -
traverse
public <C, App extends Applicative<?,App>, TravC extends Traversable<C, LambdaMap<A, AppTrav traverse?>>, AppTrav extends Applicative<TravC, App>> (Fn1<? super B, ? extends Applicative<C, App>> fn, Fn1<? super TravC, ? extends AppTrav> pure) Description copied from interface:TraversableApplyfnto 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.- Specified by:
traversein interfaceTraversable<A,B> - Type Parameters:
C- the resulting element typeApp- the result applicative typeTravC- this Traversable instance over BAppTrav- the full inferred resulting type from the traversal- Parameters:
fn- the function to applypure- the applicative pure function- Returns:
- the traversed Traversable, wrapped inside an applicative
-
equals
-
hashCode
-
toString
-
wrap
-
empty
Construct an emptyLambdaMapby wrappingCollections.emptyMap()- Type Parameters:
A- the key typeB- the value type- Returns:
- an empty
LambdaMap
-