GroupedIterator

lightdb.util.GroupedIterator
case class GroupedIterator[T, G](i: Iterator[T], grouper: T => G) extends Iterator[(G, List[T])]

Convenience Iterator that groups sorted elements together based on the grouper function.

Note: this is only useful is the underlying iterator is properly sorted by G.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Iterator[(G, List[T])]
trait IterableOnceOps[(G, List[T]), Iterator, Iterator[(G, List[T])]]
trait IterableOnce[(G, List[T])]
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited classlikes

class GroupedIterator[B >: A](self: Iterator[B], size: Int, step: Int)

Attributes

Inherited from:
Iterator
Supertypes
class AbstractIterator[Seq[B]]
trait Iterator[Seq[B]]
trait IterableOnceOps[Seq[B], Iterator, Iterator[Seq[B]]]
trait IterableOnce[Seq[B]]
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

override def hasNext: Boolean

Attributes

Definition Classes
Iterator
override def next(): (G, List[T])

Attributes

Definition Classes
Iterator

Inherited methods

final def ++[B >: (G, List[T])](xs: => IterableOnce[B]): Iterator[B]

Attributes

Inherited from:
Iterator
final def addString(b: StringBuilder): b.type

Attributes

Inherited from:
IterableOnceOps
final def addString(b: StringBuilder, sep: String): b.type

Attributes

Inherited from:
IterableOnceOps
def addString(b: StringBuilder, start: String, sep: String, end: String): b.type

Attributes

Inherited from:
IterableOnceOps
def buffered: BufferedIterator[(G, List[T])]

Attributes

Inherited from:
Iterator
def collect[B](pf: PartialFunction[(G, List[T]), B]): Iterator[B]

Attributes

Inherited from:
Iterator
def collectFirst[B](pf: PartialFunction[(G, List[T]), B]): Option[B]

Attributes

Inherited from:
IterableOnceOps
def concat[B >: (G, List[T])](xs: => IterableOnce[B]): Iterator[B]

Attributes

Inherited from:
Iterator
def contains(elem: Any): Boolean

Attributes

Inherited from:
Iterator
def copyToArray[B >: (G, List[T])](xs: Array[B], start: Int, len: Int): Int

Attributes

Inherited from:
IterableOnceOps
def copyToArray[B >: (G, List[T])](xs: Array[B], start: Int): Int

Attributes

Inherited from:
IterableOnceOps
def copyToArray[B >: (G, List[T])](xs: Array[B]): Int

Attributes

Inherited from:
IterableOnceOps
def corresponds[B](that: IterableOnce[B])(p: ((G, List[T]), B) => Boolean): Boolean

Attributes

Inherited from:
IterableOnceOps
def count(p: ((G, List[T])) => Boolean): Int

Attributes

Inherited from:
IterableOnceOps
def distinct: Iterator[(G, List[T])]

Attributes

Inherited from:
Iterator
def distinctBy[B](f: ((G, List[T])) => B): Iterator[(G, List[T])]

Attributes

Inherited from:
Iterator
def drop(n: Int): Iterator[(G, List[T])]

Attributes

Inherited from:
Iterator
def dropWhile(p: ((G, List[T])) => Boolean): Iterator[(G, List[T])]

Attributes

Inherited from:
Iterator
def duplicate: (Iterator[(G, List[T])], Iterator[(G, List[T])])

Attributes

Inherited from:
Iterator
def exists(p: ((G, List[T])) => Boolean): Boolean

Attributes

Inherited from:
IterableOnceOps
def filter(p: ((G, List[T])) => Boolean): Iterator[(G, List[T])]

Attributes

Inherited from:
Iterator
def filterNot(p: ((G, List[T])) => Boolean): Iterator[(G, List[T])]

Attributes

Inherited from:
Iterator
def find(p: ((G, List[T])) => Boolean): Option[(G, List[T])]

Attributes

Inherited from:
IterableOnceOps
def flatMap[B](f: ((G, List[T])) => IterableOnce[B]): Iterator[B]

Attributes

Inherited from:
Iterator
def flatten[B](implicit ev: ((G, List[T])) => IterableOnce[B]): Iterator[B]

Attributes

Inherited from:
Iterator
def fold[A1 >: (G, List[T])](z: A1)(op: (A1, A1) => A1): A1

Attributes

Inherited from:
IterableOnceOps
def foldLeft[B](z: B)(op: (B, (G, List[T])) => B): B

Attributes

Inherited from:
IterableOnceOps
def foldRight[B](z: B)(op: ((G, List[T]), B) => B): B

Attributes

Inherited from:
IterableOnceOps
def forall(p: ((G, List[T])) => Boolean): Boolean

Attributes

Inherited from:
IterableOnceOps
def foreach[U](f: ((G, List[T])) => U): Unit

Attributes

Inherited from:
IterableOnceOps
def grouped[B >: (G, List[T])](size: Int): GroupedIterator[B]

Attributes

Inherited from:
Iterator
def indexOf[B >: (G, List[T])](elem: B, from: Int): Int

Attributes

Inherited from:
Iterator
def indexOf[B >: (G, List[T])](elem: B): Int

Attributes

Inherited from:
Iterator
def indexWhere(p: ((G, List[T])) => Boolean, from: Int): Int

Attributes

Inherited from:
Iterator
override def isEmpty: Boolean

Attributes

Definition Classes
Iterator -> IterableOnceOps
Inherited from:
Iterator
def isTraversableAgain: Boolean

Attributes

Inherited from:
IterableOnceOps
final def iterator: Iterator[(G, List[T])]

Attributes

Inherited from:
Iterator
def knownSize: Int

Attributes

Inherited from:
IterableOnce
final def length: Int

Attributes

Inherited from:
Iterator
def map[B](f: ((G, List[T])) => B): Iterator[B]

Attributes

Inherited from:
Iterator
def max[B >: (G, List[T])](implicit ord: Ordering[B]): (G, List[T])

Attributes

Inherited from:
IterableOnceOps
def maxBy[B](f: ((G, List[T])) => B)(implicit ord: Ordering[B]): (G, List[T])

Attributes

Inherited from:
IterableOnceOps
def maxByOption[B](f: ((G, List[T])) => B)(implicit ord: Ordering[B]): Option[(G, List[T])]

Attributes

Inherited from:
IterableOnceOps
def maxOption[B >: (G, List[T])](implicit ord: Ordering[B]): Option[(G, List[T])]

Attributes

Inherited from:
IterableOnceOps
def min[B >: (G, List[T])](implicit ord: Ordering[B]): (G, List[T])

Attributes

Inherited from:
IterableOnceOps
def minBy[B](f: ((G, List[T])) => B)(implicit ord: Ordering[B]): (G, List[T])

Attributes

Inherited from:
IterableOnceOps
def minByOption[B](f: ((G, List[T])) => B)(implicit ord: Ordering[B]): Option[(G, List[T])]

Attributes

Inherited from:
IterableOnceOps
def minOption[B >: (G, List[T])](implicit ord: Ordering[B]): Option[(G, List[T])]

Attributes

Inherited from:
IterableOnceOps
final def mkString: String

Attributes

Inherited from:
IterableOnceOps
final def mkString(sep: String): String

Attributes

Inherited from:
IterableOnceOps
final def mkString(start: String, sep: String, end: String): String

Attributes

Inherited from:
IterableOnceOps
def nextOption(): Option[(G, List[T])]

Attributes

Inherited from:
Iterator
def nonEmpty: Boolean

Attributes

Inherited from:
IterableOnceOps
def padTo[B >: (G, List[T])](len: Int, elem: B): Iterator[B]

Attributes

Inherited from:
Iterator
def partition(p: ((G, List[T])) => Boolean): (Iterator[(G, List[T])], Iterator[(G, List[T])])

Attributes

Inherited from:
Iterator
def patch[B >: (G, List[T])](from: Int, patchElems: Iterator[B], replaced: Int): Iterator[B]

Attributes

Inherited from:
Iterator
def product[B >: (G, List[T])](implicit num: Numeric[B]): B

Attributes

Inherited from:
IterableOnceOps
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def reduce[B >: (G, List[T])](op: (B, B) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceLeft[B >: (G, List[T])](op: (B, (G, List[T])) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceLeftOption[B >: (G, List[T])](op: (B, (G, List[T])) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
def reduceOption[B >: (G, List[T])](op: (B, B) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
def reduceRight[B >: (G, List[T])](op: ((G, List[T]), B) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceRightOption[B >: (G, List[T])](op: ((G, List[T]), B) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
protected def reversed: Iterable[(G, List[T])]

Attributes

Inherited from:
IterableOnceOps
def sameElements[B >: (G, List[T])](that: IterableOnce[B]): Boolean

Attributes

Inherited from:
Iterator
def scanLeft[B](z: B)(op: (B, (G, List[T])) => B): Iterator[B]

Attributes

Inherited from:
Iterator
def size: Int

Attributes

Inherited from:
IterableOnceOps
def slice(from: Int, until: Int): Iterator[(G, List[T])]

Attributes

Inherited from:
Iterator
def sliding[B >: (G, List[T])](size: Int, step: Int): GroupedIterator[B]

Attributes

Inherited from:
Iterator
def span(p: ((G, List[T])) => Boolean): (Iterator[(G, List[T])], Iterator[(G, List[T])])

Attributes

Inherited from:
Iterator
def splitAt(n: Int): (Iterator[(G, List[T])], Iterator[(G, List[T])])

Attributes

Inherited from:
IterableOnceOps
def stepper[S <: Stepper[_]](implicit shape: StepperShape[(G, List[T]), S]): S

Attributes

Inherited from:
IterableOnce
def sum[B >: (G, List[T])](implicit num: Numeric[B]): B

Attributes

Inherited from:
IterableOnceOps
def take(n: Int): Iterator[(G, List[T])]

Attributes

Inherited from:
Iterator
def takeWhile(p: ((G, List[T])) => Boolean): Iterator[(G, List[T])]

Attributes

Inherited from:
Iterator
override def tapEach[U](f: ((G, List[T])) => U): Iterator[(G, List[T])]

Attributes

Definition Classes
Iterator -> IterableOnceOps
Inherited from:
Iterator
def to[C1](factory: Factory[(G, List[T]), C1]): C1

Attributes

Inherited from:
IterableOnceOps
def toArray[B >: (G, List[T]) : ClassTag]: Array[B]

Attributes

Inherited from:
IterableOnceOps
final def toBuffer[B >: (G, List[T])]: Buffer[B]

Attributes

Inherited from:
IterableOnceOps
def toIndexedSeq: IndexedSeq[(G, List[T])]

Attributes

Inherited from:
IterableOnceOps
def toList: List[(G, List[T])]

Attributes

Inherited from:
IterableOnceOps
def toMap[K, V](implicit ev: (G, List[T]) <:< (K, V)): Map[K, V]

Attributes

Inherited from:
IterableOnceOps
def toSeq: Seq[(G, List[T])]

Attributes

Inherited from:
IterableOnceOps
def toSet[B >: (G, List[T])]: Set[B]

Attributes

Inherited from:
IterableOnceOps
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Iterator -> Any
Inherited from:
Iterator
def toVector: Vector[(G, List[T])]

Attributes

Inherited from:
IterableOnceOps
def withFilter(p: ((G, List[T])) => Boolean): Iterator[(G, List[T])]

Attributes

Inherited from:
Iterator
def zip[B](that: IterableOnce[B]): Iterator[((G, List[T]), B)]

Attributes

Inherited from:
Iterator
def zipAll[A1 >: (G, List[T]), B](that: IterableOnce[B], thisElem: A1, thatElem: B): Iterator[(A1, B)]

Attributes

Inherited from:
Iterator
def zipWithIndex: Iterator[((G, List[T]), Int)]

Attributes

Inherited from:
Iterator

Deprecated and Inherited methods

final def /:[B](z: B)(op: (B, (G, List[T])) => B): B

Attributes

Deprecated
[Since version 2.13.0] Use foldLeft instead of /:
Inherited from:
IterableOnceOps
final def :\[B](z: B)(op: ((G, List[T]), B) => B): B

Attributes

Deprecated
[Since version 2.13.0] Use foldRight instead of :\\
Inherited from:
IterableOnceOps
def aggregate[B](z: => B)(seqop: (B, (G, List[T])) => B, combop: (B, B) => B): B

Attributes

Deprecated
[Since version 2.13.0] For sequential collections, prefer `foldLeft(z)(seqop)`. For parallel collections, use `ParIterableLike#aggregate`.
Inherited from:
IterableOnceOps
final def copyToBuffer[B >: (G, List[T])](dest: Buffer[B]): Unit

Attributes

Deprecated
[Since version 2.13.0] Use `dest ++= coll` instead
Inherited from:
IterableOnceOps
final override def hasDefiniteSize: Boolean

Attributes

Deprecated
[Since version 2.13.0] hasDefiniteSize on Iterator is the same as isEmpty
Definition Classes
Iterator -> IterableOnceOps
Inherited from:
Iterator
def scanRight[B](z: B)(op: ((G, List[T]), B) => B): Iterator[B]

Attributes

Deprecated
[Since version 2.13.0] Call scanRight on an Iterable instead.
Inherited from:
Iterator
def seq: Iterator.this.type

Attributes

Deprecated
[Since version 2.13.0] Iterator.seq always returns the iterator itself
Inherited from:
Iterator
final def toIterator: Iterator[(G, List[T])]

Attributes

Deprecated
[Since version 2.13.0] Use .iterator instead of .toIterator
Inherited from:
IterableOnceOps
final def toStream: Stream[(G, List[T])]

Attributes

Deprecated
[Since version 2.13.0] Use .to(LazyList) instead of .toStream
Inherited from:
IterableOnceOps