TraversalSugarExt

overflowdb.traversal.TraversalSugarExt
final class TraversalSugarExt[A](val iterator: Iterator[A]) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Concise view

Type members

Types

type Traversal[A] = Iterator[A]

Value members

Concrete methods

def cast[B]: Iterator[B]

casts all elements to given type note: this can lead to casting errors

casts all elements to given type note: this can lead to casting errors

Attributes

See also:
collectAll

as a safe alternative

def collectAll[B](implicit ev: ClassTag[B]): Iterator[B]

collects all elements of the given class (beware of type-erasure)

collects all elements of the given class (beware of type-erasure)

Attributes

def countTrav: Iterator[Int]
def dedup: Iterator[A]

Deduplicate elements of this traversal - a.k.a. distinct, unique, ...

Deduplicate elements of this traversal - a.k.a. distinct, unique, ...

Attributes

def dedupBy(fun: A => Any): Iterator[A]

deduplicate elements of this traversal by a given function

deduplicate elements of this traversal by a given function

Attributes

def head: A
def headOption: Option[A]
def help[B >: A](implicit elementType: ClassTag[B], searchPackages: DocSearchPackages): String

Print help/documentation based on the current elementType A. Relies on all step extensions being annotated with @Traversal / @Doc Note that this works independently of tab completion and implicit conversions in scope - it will simply list all documented steps in the classpath

Print help/documentation based on the current elementType A. Relies on all step extensions being annotated with @Traversal / @Doc Note that this works independently of tab completion and implicit conversions in scope - it will simply list all documented steps in the classpath

Attributes

def helpVerbose[B >: A](implicit elementType: ClassTag[B], searchPackages: DocSearchPackages): String
def iterate(): Unit

Execute the traversal without returning anything

Execute the traversal without returning anything

Attributes

def l: List[A]

Execute the traversal and convert the result to a list - shorthand for toList

Execute the traversal and convert the result to a list - shorthand for toList

Attributes

def last: A
def lastOption: Option[A]
def sortBy[B](f: A => B)(implicit ord: Ordering[B]): Seq[A]

sort elements by the value of the given transformation function

sort elements by the value of the given transformation function

Attributes

def sorted[B >: A](implicit ord: Ordering[B]): Seq[B]

sort elements by their natural order

sort elements by their natural order

Attributes

def toSetImmutable[B >: A]: Set[B]

Execute the traversal and convert the result to an immutable Set

Execute the traversal and convert the result to an immutable Set

Attributes

def toSetMutable[B >: A]: Set[B]

Execute the traversal and return a mutable.Set (better performance than immutableSet)

Execute the traversal and return a mutable.Set (better performance than immutableSet)

Attributes

Concrete fields

val iterator: Iterator[A]