|
Infinispan Distribution 5.2.6.Final-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.infinispan.util.InfinispanCollections
public class InfinispanCollections
Static helpers for Infinispan-specific collections
Nested Class Summary | |
---|---|
static class |
InfinispanCollections.EmptyList
|
static class |
InfinispanCollections.EmptyMap
|
static class |
InfinispanCollections.EmptySet
|
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 Summary | |
---|---|
InfinispanCollections()
|
Method Summary | ||
---|---|---|
static
|
difference(Set<E> s1,
Set<E> s2)
Returns the elements that are present in s1 but which are not present in s2, without changing the contents of neither s1, nor s2. |
|
static
|
emptyList()
Returns the empty list (immutable). |
|
static
|
emptyMap()
Returns the empty map (immutable). |
|
static
|
emptySet()
Returns the empty set (immutable). |
|
static
|
transformCollectionToMap(Collection<E> input,
InfinispanCollections.MapMakerFunction<K,V,E> f)
Given a collection, transforms the collection to a map given a InfinispanCollections.MapMakerFunction |
|
static
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InfinispanCollections()
Method Detail |
---|
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 map
public 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 pair
public static <E> Set<E> difference(Set<E> s1, Set<E> s2)
E
- type of objects in Sets1
- first sets2
- second set
public static final <T> Set<T> emptySet()
Collections.emptySet()
,
the set returned returns a constant Iterator, rather than create a
brand new one in each iterator call.
This set is marshallable using Infinispan's
Externalizer
framework.
EMPTY_SET
public static final <K,V> Map<K,V> emptyMap()
Collections.emptyMap()
,
the map returned returns a constant Iterator, rather than create a
brand new one in each iterator call.
This set is marshallable using Infinispan's
Externalizer
framework.
EMPTY_MAP
public static final <T> List<T> emptyList()
Collections.emptyList()
},
the list returned returns a constant Iterator, rather than create a
brand new one in each iterator call.
This set is marshallable using Infinispan's
Externalizer
framework.
EMPTY_LIST
|
Infinispan Distribution 5.2.6.Final-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |