Class BoundedLocalCache.KeySpliterator<K,V>
java.lang.Object
com.github.benmanes.caffeine.cache.BoundedLocalCache.KeySpliterator<K,V>
- All Implemented Interfaces:
Spliterator<K>
- Enclosing class:
BoundedLocalCache<K,
V>
An adapter to safely externalize the key spliterator.
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.Spliterator
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,
T_CONS, T_SPLITR extends 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 java.util.Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED
-
Constructor Summary
ConstructorsConstructorDescriptionKeySpliterator
(BoundedLocalCache<K, V> cache) KeySpliterator
(BoundedLocalCache<K, V> cache, Spliterator<Node<K, V>> spliterator) -
Method Summary
Modifier and TypeMethodDescriptionint
long
void
forEachRemaining
(Consumer<? super K> action) boolean
tryAdvance
(Consumer<? super K> action) @Nullable Spliterator
<K> trySplit()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Spliterator
getComparator, getExactSizeIfKnown, hasCharacteristics
-
Field Details
-
spliterator
-
cache
-
-
Constructor Details
-
KeySpliterator
KeySpliterator(BoundedLocalCache<K, V> cache) -
KeySpliterator
KeySpliterator(BoundedLocalCache<K, V> cache, Spliterator<Node<K, V>> spliterator)
-
-
Method Details
-
forEachRemaining
- Specified by:
forEachRemaining
in interfaceSpliterator<K>
-
tryAdvance
- Specified by:
tryAdvance
in interfaceSpliterator<K>
-
trySplit
- Specified by:
trySplit
in interfaceSpliterator<K>
-
estimateSize
public long estimateSize()- Specified by:
estimateSize
in interfaceSpliterator<K>
-
characteristics
public int characteristics()- Specified by:
characteristics
in interfaceSpliterator<K>
-