Package org.infinispan.util
Class WriteableCacheSetMapper<E,R>
- java.lang.Object
-
- java.util.AbstractCollection<R>
-
- org.infinispan.util.CollectionMapper<E,R>
-
- org.infinispan.util.WriteableCacheCollectionMapper<E,R>
-
- org.infinispan.util.WriteableCacheSetMapper<E,R>
-
- Type Parameters:
E
- the original collection type - referred to as old in some methodsR
- the resulting collection type - referred to as new in some methods
- All Implemented Interfaces:
Iterable<R>
,Collection<R>
,Set<R>
,CacheCollection<R>
,CacheSet<R>
,CloseableIteratorCollection<R>
,CloseableIteratorSet<R>
public class WriteableCacheSetMapper<E,R> extends WriteableCacheCollectionMapper<E,R> implements CacheSet<R>
A writeable cache set mapper that also has constant time operations for things such asCollection.contains(Object)
if the underlying Set does. Also implements the Set interface.This set should be used for cases when a simple transformation of an element to another is all that is needed by the underlying set.
This implementation is basically identical to
WriteableCacheCollectionMapper
except that this class also implementsSet
and all of its optional operations.- Since:
- 9.2
- Author:
- wburns
-
-
Field Summary
-
Fields inherited from class org.infinispan.util.WriteableCacheCollectionMapper
fromNewTypeFunction, keyFilterMapper, realCacheCollection, toNewTypeIteratorFunction
-
Fields inherited from class org.infinispan.util.CollectionMapper
mapper, realCollection
-
-
Constructor Summary
Constructors Constructor Description WriteableCacheSetMapper(CacheSet<E> realSet, InjectiveFunction<? super E,? extends R> toNewTypeFunction, InjectiveFunction<? super E,? extends R> toNewTypeIteratorFunction, InjectiveFunction<? super R,? extends E> fromNewTypeFunction, InjectiveFunction<Object,?> keyFilterFunction)
WriteableCacheSetMapper(CacheSet<E> realSet, InjectiveFunction<? super E,? extends R> toNewTypeFunction, InjectiveFunction<? super R,? extends E> fromNewTypeFunction, InjectiveFunction<Object,?> keyFilterFunction)
-
Method Summary
-
Methods inherited from class org.infinispan.util.WriteableCacheCollectionMapper
add, addAll, clear, contains, containsAll, iterator, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream
-
Methods inherited from class org.infinispan.util.CollectionMapper
forEach, isEmpty, size
-
Methods inherited from class java.util.AbstractCollection
toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.infinispan.CacheCollection
parallelStream, stream
-
Methods inherited from interface org.infinispan.commons.util.CloseableIteratorCollection
iterator, spliterator
-
Methods inherited from interface org.infinispan.commons.util.CloseableIteratorSet
spliterator
-
Methods inherited from interface java.util.Collection
removeIf, toArray
-
-
-
-
Constructor Detail
-
WriteableCacheSetMapper
public WriteableCacheSetMapper(CacheSet<E> realSet, InjectiveFunction<? super E,? extends R> toNewTypeFunction, InjectiveFunction<? super R,? extends E> fromNewTypeFunction, InjectiveFunction<Object,?> keyFilterFunction)
-
WriteableCacheSetMapper
public WriteableCacheSetMapper(CacheSet<E> realSet, InjectiveFunction<? super E,? extends R> toNewTypeFunction, InjectiveFunction<? super E,? extends R> toNewTypeIteratorFunction, InjectiveFunction<? super R,? extends E> fromNewTypeFunction, InjectiveFunction<Object,?> keyFilterFunction)
-
-