public class StreamMarshalling extends Object
Modifier and Type | Class and Description |
---|---|
static class |
StreamMarshalling.StreamMarshallingExternalizer |
Modifier and Type | Method and Description |
---|---|
static Predicate<Object> |
alwaysTruePredicate()
Predicate taht always returns true irrespective of the value provided
|
static <K,V> Function<Map.Entry<K,V>,K> |
entryToKeyFunction()
Provides a function that returns the key of the entry when invoked.
|
static <K,V> Function<Map.Entry<K,V>,V> |
entryToValueFunction()
Provides a function that returns the value of the entry when invoked.
|
static Predicate<Object> |
equalityPredicate(Object object)
Provides a predicate that returns true when the object is equal.
|
static <K,V> Function<K,CacheEntry<K,V>> |
keyToEntryFunction()
Provides a function that given a key will return the
CacheEntry that maps to this
key. |
static Predicate<Object> |
nonNullPredicate()
Predicate that returns true if the object passed to it is not null.
|
public static Predicate<Object> equalityPredicate(Object object)
object
- the instance to test equality onpublic static Predicate<Object> nonNullPredicate()
public static Predicate<Object> alwaysTruePredicate()
public static <K,V> Function<Map.Entry<K,V>,K> entryToKeyFunction()
K
- key type of the entryV
- value type of the entrypublic static <K,V> Function<Map.Entry<K,V>,V> entryToValueFunction()
K
- key type of the entryV
- value type of the entrypublic static <K,V> Function<K,CacheEntry<K,V>> keyToEntryFunction()
CacheEntry
that maps to this
key. This function only works when used with a CacheStream
returned
from the desired Cache
. The entry will be read from the Cache of which the
CacheStream was created from.K
- the key typeV
- the expected value type of the entryCopyright © 2018 JBoss, a division of Red Hat. All rights reserved.