Class MapPrism
- java.lang.Object
-
- com.jnape.palatable.lambda.optics.prisms.MapPrism
-
public final class MapPrism extends java.lang.Object
Prisms
forMaps
.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
MapPrism()
-
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)
APrism
that focuses on the value at a key in aMap
, and produces an instance ofM
on 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)
APrism
that focuses on the value at a key in aMap
, and produces an instance ofM
on the way back out.- Type Parameters:
M
- theMap
subtypeK
- 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
-
-