Class WriteableCacheCollectionMapper<E,R> 
- Type Parameters:
- E- the original collection type - referred to as old in some methods
- R- the resulting collection type - referred to as new in some methods
- All Implemented Interfaces:
- Iterable<R>,- Collection<R>,- CacheCollection<R>,- CloseableIteratorCollection<R>
- Direct Known Subclasses:
- WriteableCacheSetMapper
Collection.contains(Object) if the underlying Collection does.
 This collection should be used for cases when a simple transformation of a element to another is all that is needed by the underlying collection.
 Note this class allows for a different function specifically for values returned from an iterator. This
 can be useful to intercept calls such as Map.Entry.setValue(Object) and update appropriately.
- Since:
- 9.2
- Author:
- wburns
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final InjectiveFunction<Object, ?> protected final CacheCollection<E> Fields inherited from class org.infinispan.util.CollectionMappermapper, realCollection
- 
Constructor SummaryConstructorsConstructorDescriptionWriteableCacheCollectionMapper(CacheCollection<E> realCollection, Function<? super E, ? extends R> toNewTypeFunction, Function<? super E, ? extends R> toNewTypeIteratorFunction, Function<? super R, ? extends E> fromNewTypeFunction, InjectiveFunction<Object, ?> keyFilterFunction) WriteableCacheCollectionMapper(CacheCollection<E> realCollection, Function<? super E, ? extends R> toNewTypeFunction, Function<? super R, ? extends E> fromNewTypeFunction, InjectiveFunction<Object, ?> keyFilterFunction) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends R> c) voidclear()booleanbooleancontainsAll(Collection<?> c) iterator()booleanbooleanremoveAll(Collection<?> c) booleanbooleanretainAll(Collection<?> c) stream()Methods inherited from class org.infinispan.util.CollectionMapperforEach, isEmpty, sizeMethods inherited from class java.util.AbstractCollectiontoArray, toArray, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.CacheCollectionlocalPublisher, localPublisher
- 
Field Details- 
realCacheCollection
- 
toNewTypeIteratorFunction
- 
fromNewTypeFunction
- 
keyFilterMapper
 
- 
- 
Constructor Details- 
WriteableCacheCollectionMapperpublic WriteableCacheCollectionMapper(CacheCollection<E> realCollection, Function<? super E, ? extends R> toNewTypeFunction, Function<? super R, ? extends E> fromNewTypeFunction, InjectiveFunction<Object, ?> keyFilterFunction) 
- 
WriteableCacheCollectionMapper
 
- 
- 
Method Details- 
iteratorDescription copied from interface:CloseableIteratorCollectionThis iterator should be explicitly closed when iteration upon it is completed. Failure to do so could cause resources to not be freed properly - Specified by:
- iteratorin interface- CloseableIteratorCollection<E>
- Specified by:
- iteratorin interface- Collection<E>
- Specified by:
- iteratorin interface- Iterable<E>
- Overrides:
- iteratorin class- CollectionMapper<E,- R> 
 
- 
contains- Specified by:
- containsin interface- Collection<E>
- Overrides:
- containsin class- AbstractCollection<R>
 
- 
containsAll- Specified by:
- containsAllin interface- Collection<E>
- Overrides:
- containsAllin class- AbstractCollection<R>
 
- 
add- Specified by:
- addin interface- Collection<E>
- Overrides:
- addin class- CollectionMapper<E,- R> 
 
- 
addAll- Specified by:
- addAllin interface- Collection<E>
- Overrides:
- addAllin class- CollectionMapper<E,- R> 
 
- 
remove- Specified by:
- removein interface- Collection<E>
- Overrides:
- removein class- CollectionMapper<E,- R> 
 
- 
removeAll- Specified by:
- removeAllin interface- Collection<E>
- Overrides:
- removeAllin class- CollectionMapper<E,- R> 
 
- 
retainAll- Specified by:
- retainAllin interface- Collection<E>
- Overrides:
- retainAllin class- CollectionMapper<E,- R> 
 
- 
removeIf- Specified by:
- removeIfin interface- Collection<E>
 
- 
clearpublic void clear()- Specified by:
- clearin interface- Collection<E>
- Overrides:
- clearin class- CollectionMapper<E,- R> 
 
- 
spliteratorDescription copied from interface:CloseableIteratorCollectionThis spliterator should be explicitly closed after it has been used. Failure to do so could cause resources to not be freed properly - Specified by:
- spliteratorin interface- CloseableIteratorCollection<E>
- Specified by:
- spliteratorin interface- Collection<E>
- Specified by:
- spliteratorin interface- Iterable<E>
- Overrides:
- spliteratorin class- CollectionMapper<E,- R> 
 
- 
streamDescription copied from interface:CloseableIteratorCollectionThis stream should be explicitly closed after it has been used. Failure to do so could cause resources to not be freed properly - Specified by:
- streamin interface- CacheCollection<E>
- Specified by:
- streamin interface- CloseableIteratorCollection<E>
- Specified by:
- streamin interface- Collection<E>
- Overrides:
- streamin class- CollectionMapper<E,- R> 
 
- 
parallelStreamDescription copied from interface:CloseableIteratorCollectionThis stream should be explicitly closed after it has been used. Failure to do so could cause resources to not be freed properly - Specified by:
- parallelStreamin interface- CacheCollection<E>
- Specified by:
- parallelStreamin interface- CloseableIteratorCollection<E>
- Specified by:
- parallelStreamin interface- Collection<E>
- Overrides:
- parallelStreamin class- CollectionMapper<E,- R> 
 
 
-