org.hammerlab

iterator

package iterator

Visibility
  1. Public
  2. All

Type Members

  1. class GroupRunsIterator[T] extends Iterator[Iterator[T]]

    Given an iterator and a predicate function, emit iterators containing maximal runs of sequential elements that all satisfy the predicate, or individual elements that do not.

  2. class LinesIterator extends SimpleBufferedIterator[String]

    Wrap a BufferedReader and emit lines.

  3. class RangeAccruingIterator extends Iterator[Range]

    Given an Iterator of Ints, collapse contiguous "ranges" of integers that are each 1 greater than their predecessor.

  4. class RunLengthIterator[K] extends Iterator[(K, Int)]

    Run-length encode an input iterator, replacing contiguous runs of identical elements with pairs consisting of the first element in the run and the number of elements observed.

  5. trait SimpleBufferedIterator[+T] extends BufferedIterator[T]

    Interface for implementing BufferedIterators following a common pattern: the hasNext implementation must actually compute the next element (or return a sentinel that implies that one doesn't exist), and should therefore cache that element to serve head and next() calls.

  6. case class Sliding3OptIterator[T](it: BufferedIterator[T]) extends SimpleBufferedIterator[(Option[T], T, Option[T])] with Product with Serializable

    Given an Iterator[T], emit each element sandwiched between its preceding and succeeding elements.

  7. class TakeUntilIterator[T] extends Iterator[Seq[T]]

    For each element in an input Iterator, emit the sequence of elements from the current one to the next sentinel value (or the end of the iterator, if no more sentinels follow the current element).

Value Members

  1. object GroupRunsIterator

  2. object LinesIterator

  3. object RunLengthIterator

Ungrouped