Class DescendantBoxSpliterator
java.lang.Object
com.openhtmltopdf.util.DescendantBoxSpliterator
- All Implemented Interfaces:
Spliterator<Box>
A spliterator that can be used to create a stream of descendant boxes in
breadth first order.
NOTE: This is likely slower than simply creating a box list recursively for small number of descendants but gets relatively faster (and uses less memory) as the list of descendants increases in size.
NOTE: This is likely slower than simply creating a box list recursively for small number of descendants but gets relatively faster (and uses less memory) as the list of descendants increases in size.
-
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
Fields inherited from interface Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintlongbooleantryAdvance(Consumer<? super Box> action) trySplit()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Spliterator
forEachRemaining, getComparator, getExactSizeIfKnown, hasCharacteristics
-
Constructor Details
-
DescendantBoxSpliterator
-
-
Method Details
-
tryAdvance
- Specified by:
tryAdvancein interfaceSpliterator<Box>
-
trySplit
- Specified by:
trySplitin interfaceSpliterator<Box>
-
estimateSize
public long estimateSize()- Specified by:
estimateSizein interfaceSpliterator<Box>
-
characteristics
public int characteristics()- Specified by:
characteristicsin interfaceSpliterator<Box>
-