Package org.infinispan.commands.read
Class AbstractCloseableIteratorCollection<O,K,V>
java.lang.Object
java.util.AbstractCollection<O>
org.infinispan.commands.read.AbstractCloseableIteratorCollection<O,K,V>
- All Implemented Interfaces:
Iterable<O>,Collection<O>,org.infinispan.commons.util.CloseableIteratorCollection<O>
- Direct Known Subclasses:
ValueCacheCollection
public abstract class AbstractCloseableIteratorCollection<O,K,V>
extends AbstractCollection<O>
implements org.infinispan.commons.util.CloseableIteratorCollection<O>
Abstract collection that uses an underlying Cache instance to do various operations. This is useful for a backing
collection such as entrySet, keySet or values from the Map interface. Implementors only need to implement individual
methods such as
Collection.contains(Object), Collection.remove(Object) and
CloseableIteratorCollection.iterator(). The Collection.add(Object) by default will throw an
UnsupportedOperationException.
- Since:
- 7.0
- Author:
- wburns
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()abstract booleanbooleanisEmpty()abstract org.infinispan.commons.util.CloseableIterator<O> iterator()abstract booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()abstract org.infinispan.commons.util.CloseableSpliterator<O> Object[]toArray()<T> T[]toArray(T[] a) Methods inherited from class java.util.AbstractCollection
add, addAll, containsAll, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.commons.util.CloseableIteratorCollection
parallelStream, streamMethods inherited from interface java.util.Collection
add, addAll, containsAll, equals, hashCode, removeIf, toArray
-
Field Details
-
cache
-
-
Constructor Details
-
AbstractCloseableIteratorCollection
-
-
Method Details
-
iterator
- Specified by:
iteratorin interfaceorg.infinispan.commons.util.CloseableIteratorCollection<O>- Specified by:
iteratorin interfaceCollection<O>- Specified by:
iteratorin interfaceIterable<O>- Specified by:
iteratorin classAbstractCollection<O>
-
spliterator
- Specified by:
spliteratorin interfaceorg.infinispan.commons.util.CloseableIteratorCollection<O>- Specified by:
spliteratorin interfaceCollection<O>- Specified by:
spliteratorin interfaceIterable<O>
-
contains
- Specified by:
containsin interfaceCollection<O>- Overrides:
containsin classAbstractCollection<O>
-
remove
- Specified by:
removein interfaceCollection<O>- Overrides:
removein classAbstractCollection<O>
-
size
public int size()- Specified by:
sizein interfaceCollection<O>- Specified by:
sizein classAbstractCollection<O>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<O>- Overrides:
isEmptyin classAbstractCollection<O>
-
toArray
- Specified by:
toArrayin interfaceCollection<O>- Overrides:
toArrayin classAbstractCollection<O>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<O>- Overrides:
toArrayin classAbstractCollection<O>
-
removeAll
- Specified by:
removeAllin interfaceCollection<O>- Overrides:
removeAllin classAbstractCollection<O>
-
retainAll
- Specified by:
retainAllin interfaceCollection<O>- Overrides:
retainAllin classAbstractCollection<O>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<O>- Overrides:
clearin classAbstractCollection<O>
-