Package org.infinispan.util
Class SetMapper<E,R>
java.lang.Object
java.util.AbstractCollection<R>
org.infinispan.util.CollectionMapper<E,R>
org.infinispan.util.SetMapper<E,R>
- All Implemented Interfaces:
Iterable<R>,Collection<R>,Set<R>
- Direct Known Subclasses:
CacheSetMapper
A set that maps another one to a new one of a possibly different type. Note this set is read only
and doesn't accept write operations.
This class currently only accepts a Function that also implements InjectiveFunction so that it can
guarantee the resulting mapped values are distinct from each other. This is important as many operations because
very costly if this is not true.
Some operations such as Collection.contains(Object) and Collection.containsAll(Collection) may be
more expensive then normal since they cannot utilize lookups into the original collection.
- Since:
- 9.0
- Author:
- wburns
-
Field Summary
Fields inherited from class org.infinispan.util.CollectionMapper
mapper, realCollection -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.infinispan.util.CollectionMapper
add, addAll, clear, forEach, isEmpty, iterator, parallelStream, remove, removeAll, retainAll, size, spliterator, streamMethods inherited from class java.util.AbstractCollection
contains, containsAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Constructor Details
-
SetMapper
-