public class InfinispanCollections extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
InfinispanCollections.Function<E,T>
A function that converts a type into another one.
|
static interface |
InfinispanCollections.MapMakerFunction<K,V,E>
A function that converts an entry into a key/value pair for use in a map.
|
Constructor and Description |
---|
InfinispanCollections() |
Modifier and Type | Method and Description |
---|---|
static <K,V,E> Map<K,V> |
transformCollectionToMap(Collection<E> input,
InfinispanCollections.MapMakerFunction<K,V,E> f)
Given a collection, transforms the collection to a map given a
InfinispanCollections.MapMakerFunction |
static <K,V,E> Map<K,V> |
transformMapValue(Map<K,E> input,
InfinispanCollections.Function<E,V> f)
Given a map of well known key/value types, it makes a shallow copy of it
while at the same time transforming it's value type to a desired output
type.
|
public static <K,V,E> Map<K,V> transformMapValue(Map<K,E> input, InfinispanCollections.Function<E,V> f)
K
- input map's key typeV
- desired output type of the map's valueE
- input map's value typeinput
- contains the input key/value pair mapf
- function instance to use to transform the value part of the mappublic static <K,V,E> Map<K,V> transformCollectionToMap(Collection<E> input, InfinispanCollections.MapMakerFunction<K,V,E> f)
InfinispanCollections.MapMakerFunction
K
- output map's key typeV
- output type of the map's valueE
- input collection's entry typeinput
- contains a collection of type Ef
- MapMakerFunction instance to use to transform the collection to a key/value pairCopyright © 2012 JBoss by Red Hat. All Rights Reserved.