Class BoundedLocalCache.EntrySpliterator<K,V>
java.lang.Object
com.github.benmanes.caffeine.cache.BoundedLocalCache.EntrySpliterator<K,V>
- All Implemented Interfaces:
Spliterator<Map.Entry<K,V>>
- Enclosing class:
BoundedLocalCache<K,V>
static final class BoundedLocalCache.EntrySpliterator<K,V>
extends Object
implements Spliterator<Map.Entry<K,V>>
An adapter to safely externalize the entry spliterator.
-
Nested Class Summary
Nested classes/interfaces inherited from interface Spliterator
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,T_CONS, T_SPLITR> -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final BoundedLocalCache<K, V> (package private) final Spliterator<Node<K, V>> Fields inherited from interface Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED -
Constructor Summary
ConstructorsConstructorDescriptionEntrySpliterator(BoundedLocalCache<K, V> cache) EntrySpliterator(BoundedLocalCache<K, V> cache, Spliterator<Node<K, V>> spliterator) -
Method Summary
Modifier and TypeMethodDescriptionintlongvoidforEachRemaining(Consumer<? super Map.Entry<K, V>> action) booleantryAdvance(Consumer<? super Map.Entry<K, V>> action) @Nullable Spliterator<Map.Entry<K, V>> trySplit()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Spliterator
getComparator, getExactSizeIfKnown, hasCharacteristics
-
Field Details
-
spliterator
-
cache
-
-
Constructor Details
-
EntrySpliterator
EntrySpliterator(BoundedLocalCache<K, V> cache) -
EntrySpliterator
EntrySpliterator(BoundedLocalCache<K, V> cache, Spliterator<Node<K, V>> spliterator)
-
-
Method Details
-
forEachRemaining
- Specified by:
forEachRemainingin interfaceSpliterator<K>
-
tryAdvance
- Specified by:
tryAdvancein interfaceSpliterator<K>
-
trySplit
- Specified by:
trySplitin interfaceSpliterator<K>
-
estimateSize
public long estimateSize()- Specified by:
estimateSizein interfaceSpliterator<K>
-
characteristics
public int characteristics()- Specified by:
characteristicsin interfaceSpliterator<K>
-