Class MapPrism
- java.lang.Object
-
- com.jnape.palatable.lambda.optics.prisms.MapPrism
-
public final class MapPrism extends java.lang.ObjectPrismsforMaps.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateMapPrism()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <M extends java.util.Map<K,V>,K,V>
Prism<java.util.Map<K,V>,M,V,V>valueAt(Fn1<java.util.Map<K,V>,M> copyFn, K k)APrismthat focuses on the value at a key in aMap, and produces an instance ofMon the way back out.static <K,V>
Prism.Simple<java.util.Map<K,V>,V>valueAt(K k)
-
-
-
Method Detail
-
valueAt
public static <M extends java.util.Map<K,V>,K,V> Prism<java.util.Map<K,V>,M,V,V> valueAt(Fn1<java.util.Map<K,V>,M> copyFn, K k)
APrismthat focuses on the value at a key in aMap, and produces an instance ofMon the way back out.- Type Parameters:
M- theMapsubtypeK- the key typeV- the value type- Parameters:
copyFn- the copy functionk- the key to focus on- Returns:
- the
Prism
-
valueAt
public static <K,V> Prism.Simple<java.util.Map<K,V>,V> valueAt(K k)
- Type Parameters:
K- the key typeV- the value type- Parameters:
k- the key to focus on- Returns:
- the
Prism
-
-