public final class MapPrism
extends Object
-
Constructor Summary
Constructors
-
Method Summary
static <M extends Map<K,
V>,
K,
V>
Prism<Map<K,V>,M,V,V>
A
Prism
that focuses on the value at a key in a
Map
, and produces an instance of
M
on the way back out.
A
Prism
that focuses on the value at a key in a
Map
making no guarantees about the
Map
interface.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
MapPrism
private MapPrism()
-
Method Details
-
valueAt
public static <M extends Map<K,
V>,
K,
V>
Prism<Map<K,V>,M,V,V> valueAt(Fn1<Map<K,V>,M> copyFn,
K k)
A
Prism
that focuses on the value at a key in a
Map
, and produces an instance of
M
on the way back out.
- Type Parameters:
M
- the Map
subtype
K
- the key type
V
- the value type
- Parameters:
copyFn
- the copy function
k
- the key to focus on
- Returns:
- the
Prism
-
valueAt
A
Prism
that focuses on the value at a key in a
Map
making no guarantees about the
Map
interface.
- Type Parameters:
K
- the key type
V
- the value type
- Parameters:
k
- the key to focus on
- Returns:
- the
Prism