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 as
Collection.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 implements Set and all of its optional operations.
- Since:
- 9.2
- Author:
- wburns
-
Field Summary
Fields inherited from class org.infinispan.util.WriteableCacheCollectionMapper
fromNewTypeFunction, keyFilterMapper, realCacheCollection, toNewTypeIteratorFunctionFields inherited from class org.infinispan.util.CollectionMapper
mapper, realCollection -
Constructor Summary
ConstructorsConstructorDescriptionWriteableCacheSetMapper(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, streamMethods inherited from class org.infinispan.util.CollectionMapper
forEach, isEmpty, sizeMethods inherited from class java.util.AbstractCollection
toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.CacheCollection
localPublisher, localPublisher, parallelStream, streamMethods inherited from interface org.infinispan.commons.util.CloseableIteratorCollection
iterator, spliteratorMethods inherited from interface org.infinispan.commons.util.CloseableIteratorSet
spliteratorMethods inherited from interface java.util.Collection
removeIf, toArray
-
Constructor Details
-
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)
-