final class Factories extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
(package private) static <K,V> java.util.Map<K,V> |
createMap(java.util.function.Supplier<? extends java.util.Map<java.lang.Object,java.lang.Object>> factory)
Encapsulates the unsafe cast necessary when creating a map with a factory that is unaware of the key/value types
of the map.
|
(package private) static <V> java.util.Queue<V> |
createQueue(java.util.function.Supplier<? extends java.util.Queue<java.lang.Object>> factory)
Encapsulates the unsafe cast necessary when creating a queue with a factory that is unaware of the value type of
the queue.
|
static <V> java.util.Queue<V> createQueue(java.util.function.Supplier<? extends java.util.Queue<java.lang.Object>> factory)
V - the queue value typefactory - the queue factorystatic <K,V> java.util.Map<K,V> createMap(java.util.function.Supplier<? extends java.util.Map<java.lang.Object,java.lang.Object>> factory)
K - the map key typeV - the map value typefactory - the map factory