public class Util extends Object
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static PrimitiveIterator.OfLong |
mergedRemovedIndices(IList<Iterator<Long>> iteratorStack)
Given a stack of collections, each removing some number of indices from the previous one, return the combined
sequence of removed indices from the collection underlying the first element.
|
static long |
offsetIndex(ISortedSet<Long> removedIndices,
long idx)
Given an index on a collection which is an underlying collection with some indices removed, return the corresponding
index within that underlying collection.
|
static OptionalLong |
removedPredecessors(ISortedSet<Long> removedIndices,
long idx) |
static <V> Iterator<V> |
skipIndices(Iterator<V> it,
Iterator<Long> skippedIndices)
Given a sequence and a set of indices to skip, return the sequence with those indices omitted.
|
public static OptionalLong removedPredecessors(ISortedSet<Long> removedIndices, long idx)
idx
, unless idx
itself is removedpublic static long offsetIndex(ISortedSet<Long> removedIndices, long idx)
public static <V> Iterator<V> skipIndices(Iterator<V> it, Iterator<Long> skippedIndices)
public static PrimitiveIterator.OfLong mergedRemovedIndices(IList<Iterator<Long>> iteratorStack)