Traversal

class Traversal[+A](elements: IterableOnce[A]) extends IterableOnce[A] with IterableOps[A, Traversal, Traversal[A]] with IterableFactoryDefaults[A, Traversal]

TODO more docs

Just like Tinkerpop3 and most other Iterators, a Traversal can only be executed once.

Companion:
object
trait IterableFactoryDefaults[A, Traversal]
trait IterableOps[A, Traversal, Traversal[A]]
trait IterableOnceOps[A, Traversal, Traversal[A]]
trait IterableOnce[A]
class Object
trait Matchable
class Any

Value members

Concrete methods

@Doc(info = "aggregate all objects at this point into the given collection (side effect)")
def aggregate(into: Growable[A]): Traversal[A]

aggregate all objects at this point into the given collection (side effect)

aggregate all objects at this point into the given collection (side effect)

Example:
val xs = mutable.ArrayBuffer.empty[A]
myTraversal.aggregate(xs).foo.bar
// xs will be filled once `myTraversal` is executed
@Doc(info = "only preserves elements for which _all of_ the given traversals have at least one result")
def and(traversals: Traversal[A] => Traversal[_]*): Traversal[A]

only preserves elements for which all of the given traversals have at least one result Works for arbitrary amount of 'AND' traversals.

only preserves elements for which all of the given traversals have at least one result Works for arbitrary amount of 'AND' traversals.

Example:
 .and(_.label("someLabel"),
      _.has("someProperty"))
def both: Traversal[Node]
Implicitly added by toNodeTraversal

follow incoming and outgoing edges to adjacent nodes

follow incoming and outgoing edges to adjacent nodes

def both(labels: String*): Traversal[Node]
Implicitly added by toNodeTraversal

follow incoming and outgoing edges of given labels to adjacent nodes

follow incoming and outgoing edges of given labels to adjacent nodes

def bothE: Traversal[Edge]
Implicitly added by toNodeTraversal

follow incoming and outgoing edges

follow incoming and outgoing edges

def bothE(labels: String*): Traversal[Edge]
Implicitly added by toNodeTraversal

follow incoming and outgoing edges of given label

follow incoming and outgoing edges of given label

@Doc(info = "casts all elements to given type")
def cast[B]: Traversal[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

See also:
collectAll
@Doc(info = "allows to implement conditional semantics: if, if/else, if/elseif, if/elseif/else, ...")
def choose[BranchOn >: Null, NewEnd](on: Traversal[A] => Traversal[BranchOn])(options: PartialFunction[BranchOn, Traversal[A] => Traversal[NewEnd]]): Traversal[NewEnd]

Branch step: based on the current element, match on something given a traversal, and provide resulting traversals based on the matched element. Allows to implement conditional semantics: if, if/else, if/elseif, if/elseif/else, ...

Branch step: based on the current element, match on something given a traversal, and provide resulting traversals based on the matched element. Allows to implement conditional semantics: if, if/else, if/elseif, if/elseif/else, ...

Type parameters:
BranchOn

required to be >: Null because the implementation is using null as the default value. I didn't find a better way to implement all semantics with the niceties of PartialFunction, and also yolo...

NewEnd

The element type of the resulting traversal

Value parameters:
on

Traversal to get to what you want to match on

options

PartialFunction from the matched element to the resulting traversal

See also:

LogicalStepsTests

Example:
.choose(_.property(Name)) {
 case "L1" => _.out
 case "R1" => _.repeat(_.out)(_.times(3))
 case _ => _.in
}
@Doc(info = "evaluates the provided traversals in order and returns the first traversal that emits at least one element")
def coalesce[NewEnd](options: Traversal[A] => Traversal[NewEnd]*): Traversal[NewEnd]

Branch step: evaluates the provided traversals in order and returns the first traversal that emits at least one element.

Branch step: evaluates the provided traversals in order and returns the first traversal that emits at least one element.

See also:

LogicalStepsTests

Example:
.coalesce(
  _.out("label1"),
  _.in("label2"),
  _.in("label3")
)
@Doc(info = "collects and all elements of the provided type")
def collectAll[B : ClassTag]: Traversal[B]

collects and all elements of the given type

collects and all elements of the given type

def count: Traversal[Int]
@Doc(info = "deduplicate elements of this traversal - a.k.a. distinct, unique, ...")

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

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

@Doc(info = "deduplicate elements of this traversal by a given function")
def dedupBy(fun: A => Any): Traversal[A]

deduplicate elements of this traversal by a given function

deduplicate elements of this traversal by a given function

@Doc(info = "enable path tracking - prerequisite for path/simplePath steps")
@Doc(info = "group elements and count how often they appear")
def groupCount[B >: A]: Map[B, Int]

group elements and count how often they appear

group elements and count how often they appear

@Doc(info = "group elements by a given transformation function and count how often the results appear")
def groupCount[B](by: A => B): Map[B, Int]

group elements by a given transformation function and count how often the results appear

group elements by a given transformation function and count how often the results appear

def has(key: PropertyKey[_]): Traversal[E]
Implicitly added by toElementTraversal

Filter elements by existence of property (irrespective of value)

Filter elements by existence of property (irrespective of value)

def has(name: String): Traversal[E]
Implicitly added by toElementTraversal

Filter elements by existence of property (irrespective of value)

Filter elements by existence of property (irrespective of value)

def has(keyValue: Property[_]): Traversal[E]
Implicitly added by toElementTraversal

Filter elements by property value

Filter elements by property value

def has[A](key: PropertyKey[A], value: A): Traversal[E]
Implicitly added by toElementTraversal

Filter elements by property value

Filter elements by property value

def has[A](propertyPredicate: PropertyPredicate[A]): Traversal[E]
Implicitly added by toElementTraversal

Filter elements by property with given predicate.

Filter elements by property with given predicate.

Example:

from GenericGraphTraversalTest

.has(Name.where(_.endsWith("1")))
.has(Name.where(_.matches("[LR].")))
.has(Name.where(P.eq("R1")))
.has(Name.where(P.neq("R1")))
.has(Name.where(P.within(Set("L1", "L2"))))
.has(Name.where(P.within("L1", "L2", "L3")))
.has(Name.where(P.matches("[LR].")))
def has(key: String, value: Any): Traversal[E]
Implicitly added by toElementTraversal

Filter elements by property value

Filter elements by property value

def hasId(value: Long): Traversal[E]
Implicitly added by toNodeTraversal

alias for

alias for

id
def hasId(values: Long*): Traversal[E]
Implicitly added by toNodeTraversal

alias for

alias for

id
def hasLabel(value: String): Traversal[E]
Implicitly added by toElementTraversal

alias for

alias for

label
def hasLabel(values: String*): Traversal[E]
Implicitly added by toElementTraversal

alias for

alias for

label
def hasNext: Boolean
def hasNot(key: PropertyKey[_]): Traversal[E]
Implicitly added by toElementTraversal

Filter elements by (non-)existence of property (irrespective of value)

Filter elements by (non-)existence of property (irrespective of value)

def hasNot(name: String): Traversal[E]
Implicitly added by toElementTraversal

Filter elements by (non-)existence of property (irrespective of value)

Filter elements by (non-)existence of property (irrespective of value)

def hasNot(keyValue: Property[_]): Traversal[E]
Implicitly added by toElementTraversal

Filter elements by property value

Filter elements by property value

def hasNot[A](key: PropertyKey[A], value: A): Traversal[E]
Implicitly added by toElementTraversal

Filter elements by property value

Filter elements by property value

def hasNot(key: String, value: Any): Traversal[E]
Implicitly added by toElementTraversal

Filter elements by property value

Filter elements by property value

def hasNot[A](propertyPredicate: PropertyPredicate[A]): Traversal[E]
Implicitly added by toElementTraversal

Filter elements by property with given predicate.

Filter elements by property with given predicate.

Example:

from GenericGraphTraversalTest

.hasNot(Name.where(_.endsWith("1")))
.hasNot(Name.where(_.matches("[LR].")))
.hasNot(Name.where(P.eq("R1")))
.hasNot(Name.where(P.neq("R1")))
.hasNot(Name.where(P.within(Set("L1", "L2"))))
.hasNot(Name.where(P.within("L1", "L2", "L3")))
.hasNot(Name.where(P.matches("[LR].")))
@Doc(info = "print help/documentation based on the current elementType `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

@Doc(info = "print verbose help/documentation based on the current elementType `A`.")
def helpVerbose[B >: A](implicit elementType: ClassTag[B], searchPackages: DocSearchPackages): String
@Doc(info = "Traverse to node id")
def id: Traversal[Long]
Implicitly added by toNodeTraversal
def id(value: Long): Traversal[E]
Implicitly added by toNodeTraversal

Filter by given id Note: do not use as the first step in a traversal, e.g. traversalSource.all.id(value). Use traversalSource.withId instead, it is much faster

Filter by given id Note: do not use as the first step in a traversal, e.g. traversalSource.all.id(value). Use traversalSource.withId instead, it is much faster

def id(values: Long*): Traversal[E]
Implicitly added by toNodeTraversal

Filter by given ids Note: do not use as the first step in a traversal, e.g. traversalSource.all.id(value). Use traversalSource.withId instead, it is much faster

Filter by given ids Note: do not use as the first step in a traversal, e.g. traversalSource.all.id(value). Use traversalSource.withId instead, it is much faster

def in: Traversal[Node]
Implicitly added by toNodeTraversal

follow incoming edges to adjacent nodes

follow incoming edges to adjacent nodes

def in(labels: String*): Traversal[Node]
Implicitly added by toNodeTraversal

follow incoming edges of given label to adjacent nodes

follow incoming edges of given label to adjacent nodes

def inE: Traversal[Edge]
Implicitly added by toNodeTraversal

follow incoming edges

follow incoming edges

def inE(labels: String*): Traversal[Edge]
Implicitly added by toNodeTraversal

follow incoming edges of given label

follow incoming edges of given label

def inV: Traversal[Node]
Implicitly added by toEdgeTraversal

traverse to incoming node [A] ---edge--> B

traverse to incoming node [A] ---edge--> B

override def iterableFactory: IterableFactory[Traversal]
Definition Classes
IterableOps
@Doc(info = "Execute the traversal without returning anything")
def iterate(): Unit

Execute the traversal without returning anything

Execute the traversal without returning anything

@Doc(info = "Execute the traversal and convert the result to a list - shorthand for `toList`")
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

@Doc(info = "Traverse to the element label")
def label: Traversal[String]
Implicitly added by toElementTraversal

traverse to the element label

traverse to the element label

def label(value: String): Traversal[E]
Implicitly added by toElementTraversal

filter by the element label Note: do not use as the first step in a traversal, e.g. traversalSource.all.label(value). Use traversalSource.label instead, it is much faster TODO: make the above an automatic optimisation

filter by the element label Note: do not use as the first step in a traversal, e.g. traversalSource.all.label(value). Use traversalSource.label instead, it is much faster TODO: make the above an automatic optimisation

def label(values: String*): Traversal[E]
Implicitly added by toElementTraversal

filter by the element labels Note: do not use as the first step in a traversal, e.g. traversalSource.all.label(value). Use traversalSource.label instead, it is much faster TODO: make the above an automatic optimisation

filter by the element labels Note: do not use as the first step in a traversal, e.g. traversalSource.all.label(value). Use traversalSource.label instead, it is much faster TODO: make the above an automatic optimisation

def labelNot(value: String): Traversal[E]
Implicitly added by toElementTraversal

filter by the element label (inverse)

filter by the element label (inverse)

def labelNot(value1: String, valueN: String*): Traversal[E]
Implicitly added by toElementTraversal

filter by the element labels (inverse)

filter by the element labels (inverse)

def next(): A
def nextOption(): Option[A]
@Doc(info = "only preserves elements if the provided traversal does _not_ have any results - alias for whereNot")
def not(trav: Traversal[A] => Traversal[_]): Traversal[A]

only preserves elements if the provided traversal does not have any results - alias for whereNot

only preserves elements if the provided traversal does not have any results - alias for whereNot

@Doc(info = "only preserves elements for which _at least one of_ the given traversals has at least one result")
def or(traversals: Traversal[A] => Traversal[_]*): Traversal[A]

only preserves elements for which at least one of the given traversals has at least one result Works for arbitrary amount of 'OR' traversals.

only preserves elements for which at least one of the given traversals has at least one result Works for arbitrary amount of 'OR' traversals.

Example:
 .or(_.label("someLabel"),
     _.has("someProperty"))
@Doc(info = "follow outgoing edges to adjacent nodes")
def out: Traversal[Node]
Implicitly added by toNodeTraversal

follow outgoing edges to adjacent nodes

follow outgoing edges to adjacent nodes

def out(labels: String*): Traversal[Node]
Implicitly added by toNodeTraversal

follow outgoing edges of given labels to adjacent nodes

follow outgoing edges of given labels to adjacent nodes

def outE: Traversal[Edge]
Implicitly added by toNodeTraversal

follow outgoing edges

follow outgoing edges

def outE(labels: String*): Traversal[Edge]
Implicitly added by toNodeTraversal

follow outgoing edges of given label

follow outgoing edges of given label

def outV: Traversal[Node]
Implicitly added by toEdgeTraversal

traverse to outgoing node A ---edge--> [B]

traverse to outgoing node A ---edge--> [B]

@Doc(info = "retrieve entire path that has been traversed thus far")
def path: Traversal[Vector[Any]]

retrieve entire path that has been traversed thus far prerequisite: enablePathTracking has been called previously

retrieve entire path that has been traversed thus far prerequisite: enablePathTracking has been called previously

Example:
myTraversal.enablePathTracking.out.out.path.toList
def propertiesMap: Traversal[Map[String, Object]]
Implicitly added by toElementTraversal
def property[A](key: PropertyKey[A]): Traversal[A]
Implicitly added by toElementTraversal
def property[A](key: String): Traversal[A]
Implicitly added by toElementTraversal
def propertyOption[A](key: PropertyKey[A]): Traversal[Option[A]]
Implicitly added by toElementTraversal
def propertyOption[A](key: String): Traversal[Option[A]]
Implicitly added by toElementTraversal
@Doc(info = "repeat the given traversal")
def repeat[B >: A](repeatTraversal: Traversal[A] => Traversal[B])(implicit behaviourBuilder: Builder[B] => Builder[B]): Traversal[B]

Repeat the given traversal

Repeat the given traversal

By default it will continue repeating until there's no more results, not emit anything along the way, and use depth first search.

The @param behaviourBuilder allows you to configure end conditions (times/until), whether it should emit elements it passes by, and which search algorithm to use (depth-first or breadth-first).

Search algorithm: Depth First Search (DFS) vs Breadth First Search (BFS): DFS means the repeat step will go deep before wide. BFS does the opposite: wide before deep. For example, given the graph

 L3 <- L2 <- L1 <- Center -> R1 -> R2 -> R3 -> R4 

DFS will iterate the nodes in the order:

 Center, L1, L2, L3, R1, R2, R3, R4 

BFS will iterate the nodes in the order:

 Center, L1, R1, R1, R2, L3, R3, R4 
See also:

RepeatTraversalTests for more detail and examples for all of the above.

Note:

this works for domain-specific steps as well as generic graph steps - for details please take a look at the examples in RepeatTraversalTests: both '''.followedBy''' and '''.out''' work.

Example:
.repeat(_.out)                            // repeat until there's no more elements, emit nothing, use DFS
.repeat(_.out)(_.times(3))                               // perform exactly three repeat iterations
.repeat(_.out)(_.until(_.property(Name).endsWith("2")))  // repeat until the 'Name' property ends with '2'
.repeat(_.out)(_.emit)                                   // emit everything along the way
.repeat(_.out)(_.emit.breadthFirstSearch)                // emit everything, use BFS
.repeat(_.out)(_.emit(_.property(Name).startsWith("L"))) // emit if the 'Name' property starts with 'L'
@Doc(info = "perform side effect without changing the contents of the traversal")
def sideEffect(fun: A => Unit): Traversal[A]

perform side effect without changing the contents of the traversal

perform side effect without changing the contents of the traversal

@Doc(info = "perform side effect without changing the contents of the traversal")
def sideEffectPF(pf: PartialFunction[A, Unit]): Traversal[A]

perform side effect without changing the contents of the traversal will only apply the partialFunction if it is defined for the given input - analogous to collect

perform side effect without changing the contents of the traversal will only apply the partialFunction if it is defined for the given input - analogous to collect

Removes all results whose traversal path has repeated objects. prerequisite:

Removes all results whose traversal path has repeated objects. prerequisite:

enablePathTracking
@Doc(info = "sort elements by the value of the given transformation function")
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

@Doc(info = "sort elements by their natural order")
def sorted[B >: A](implicit ord: Ordering[B]): Seq[B]

sort elements by their natural order

sort elements by their natural order

override def toIterable: Iterable[A]
Definition Classes
IterableOps
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

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)

override def toString: String
Definition Classes
Any
@Doc(info = "union/sum/aggregate given traversals from the current point")
def union[B](traversals: Traversal[A] => Traversal[B]*): Traversal[B]

union step from the current point

union step from the current point

Value parameters:
traversals

to be executed from here, results are being aggregated/summed/unioned

Example:
 .union(_.out, _.in)
@Doc(info = "only preserves elements if the provided traversal has at least one result")
def where(trav: Traversal[A] => Traversal[_]): Traversal[A]

only preserves elements if the provided traversal has at least one result

only preserves elements if the provided traversal has at least one result

@Doc(info = "only preserves elements if the provided traversal does _not_ have any results")
def whereNot(trav: Traversal[A] => Traversal[_]): Traversal[A]

only preserves elements if the provided traversal does not have any results

only preserves elements if the provided traversal does not have any results

@Doc(info = "filters out all elements that are _not_ in the provided set")
def within[B >: A](values: Set[B]): Traversal[A]

filters out all elements that are not in the provided set

filters out all elements that are not in the provided set

@Doc(info = "filters out all elements that _are_ in the provided set")
def without[B >: A](values: Set[B]): Traversal[A]

filters out all elements that are in the provided set

filters out all elements that are in the provided set

Inherited methods

@inline
final def ++[B >: A](suffix: IterableOnce[B]): Traversal[B]
Inherited from:
IterableOps
@inline
final def addString(b: StringBuilder): StringBuilder
Inherited from:
IterableOnceOps
@inline
final def addString(b: StringBuilder, sep: String): StringBuilder
Inherited from:
IterableOnceOps
def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder
Inherited from:
IterableOnceOps
def collect[B](pf: PartialFunction[A, B]): Traversal[B]
Inherited from:
IterableOps
def collectFirst[B](pf: PartialFunction[A, B]): Option[B]
Inherited from:
IterableOnceOps
def concat[B >: A](suffix: IterableOnce[B]): Traversal[B]
Inherited from:
IterableOps
def copyToArray[B >: A](xs: Array[B], start: Int, len: Int): Int
Inherited from:
IterableOnceOps
@deprecatedOverriding(message = "This should always forward to the 3-arg version of this method", since = "2.13.4")
def copyToArray[B >: A](xs: Array[B], start: Int): Int
Inherited from:
IterableOnceOps
@deprecatedOverriding(message = "This should always forward to the 3-arg version of this method", since = "2.13.4")
def copyToArray[B >: A](xs: Array[B]): Int
Inherited from:
IterableOnceOps
def corresponds[B](that: IterableOnce[B])(p: (A, B) => Boolean): Boolean
Inherited from:
IterableOnceOps
def count(p: A => Boolean): Int
Inherited from:
IterableOnceOps
def drop(n: Int): Traversal[A]
Inherited from:
IterableOps
def dropRight(n: Int): Traversal[A]
Inherited from:
IterableOps
def dropWhile(p: A => Boolean): Traversal[A]
Inherited from:
IterableOps
override def empty: Traversal[A]
Definition Classes
IterableFactoryDefaults -> IterableOps
Inherited from:
IterableFactoryDefaults
def exists(p: A => Boolean): Boolean
Inherited from:
IterableOnceOps
def filter(pred: A => Boolean): Traversal[A]
Inherited from:
IterableOps
def filterNot(pred: A => Boolean): Traversal[A]
Inherited from:
IterableOps
def find(p: A => Boolean): Option[A]
Inherited from:
IterableOnceOps
def flatMap[B](f: A => IterableOnce[B]): Traversal[B]
Inherited from:
IterableOps
def flatten[B](implicit asIterable: A => IterableOnce[B]): Traversal[B]
Inherited from:
IterableOps
def fold[A1 >: A](z: A1)(op: (A1, A1) => A1): A1
Inherited from:
IterableOnceOps
def foldLeft[B](z: B)(op: (B, A) => B): B
Inherited from:
IterableOnceOps
def foldRight[B](z: B)(op: (A, B) => B): B
Inherited from:
IterableOnceOps
def forall(p: A => Boolean): Boolean
Inherited from:
IterableOnceOps
def foreach[U](f: A => U): Unit
Inherited from:
IterableOnceOps
protected def fromSpecific(coll: IterableOnce[A]): Traversal[A]
Inherited from:
IterableFactoryDefaults
def groupBy[K](f: A => K): Map[K, Traversal[A]]
Inherited from:
IterableOps
def groupMap[K, B](key: A => K)(f: A => B): Map[K, Traversal[B]]
Inherited from:
IterableOps
def groupMapReduce[K, B](key: A => K)(f: A => B)(reduce: (B, B) => B): Map[K, B]
Inherited from:
IterableOps
def grouped(size: Int): Iterator[Traversal[A]]
Inherited from:
IterableOps
def head: A
Inherited from:
IterableOps
def headOption: Option[A]
Inherited from:
IterableOps
def init: Traversal[A]
Inherited from:
IterableOps
def inits: Iterator[Traversal[A]]
Inherited from:
IterableOps
def isEmpty: Boolean
Inherited from:
IterableOnceOps
override def isTraversableAgain: Boolean
Definition Classes
IterableOps -> IterableOnceOps
Inherited from:
IterableOps
def knownSize: Int
Inherited from:
IterableOnce
def last: A
Inherited from:
IterableOps
def lastOption: Option[A]
Inherited from:
IterableOps
def map[B](f: A => B): Traversal[B]
Inherited from:
IterableOps
def max[B >: A](implicit ord: Ordering[B]): A
Inherited from:
IterableOnceOps
def maxBy[B](f: A => B)(implicit cmp: Ordering[B]): A
Inherited from:
IterableOnceOps
def maxByOption[B](f: A => B)(implicit cmp: Ordering[B]): Option[A]
Inherited from:
IterableOnceOps
def maxOption[B >: A](implicit ord: Ordering[B]): Option[A]
Inherited from:
IterableOnceOps
def min[B >: A](implicit ord: Ordering[B]): A
Inherited from:
IterableOnceOps
def minBy[B](f: A => B)(implicit cmp: Ordering[B]): A
Inherited from:
IterableOnceOps
def minByOption[B](f: A => B)(implicit cmp: Ordering[B]): Option[A]
Inherited from:
IterableOnceOps
def minOption[B >: A](implicit ord: Ordering[B]): Option[A]
Inherited from:
IterableOnceOps
@inline
final def mkString: String
Inherited from:
IterableOnceOps
@inline
final def mkString(sep: String): String
Inherited from:
IterableOnceOps
final def mkString(start: String, sep: String, end: String): String
Inherited from:
IterableOnceOps
protected def newSpecificBuilder: Builder[A, Traversal[A]]
Inherited from:
IterableFactoryDefaults
@deprecatedOverriding(message = "nonEmpty is defined as !isEmpty; override isEmpty instead", since = "2.13.0")
def nonEmpty: Boolean
Inherited from:
IterableOnceOps
def partition(p: A => Boolean): (Traversal[A], Traversal[A])
Inherited from:
IterableOps
def partitionMap[A1, A2](f: A => Either[A1, A2]): (Traversal[A1], Traversal[A2])
Inherited from:
IterableOps
def product[B >: A](implicit num: Numeric[B]): B
Inherited from:
IterableOnceOps
def reduce[B >: A](op: (B, B) => B): B
Inherited from:
IterableOnceOps
def reduceLeft[B >: A](op: (B, A) => B): B
Inherited from:
IterableOnceOps
def reduceLeftOption[B >: A](op: (B, A) => B): Option[B]
Inherited from:
IterableOnceOps
def reduceOption[B >: A](op: (B, B) => B): Option[B]
Inherited from:
IterableOnceOps
def reduceRight[B >: A](op: (A, B) => B): B
Inherited from:
IterableOnceOps
def reduceRightOption[B >: A](op: (A, B) => B): Option[B]
Inherited from:
IterableOnceOps
protected def reversed: Iterable[A]
Inherited from:
IterableOnceOps
def scan[B >: A](z: B)(op: (B, B) => B): Traversal[B]
Inherited from:
IterableOps
def scanLeft[B](z: B)(op: (B, A) => B): Traversal[B]
Inherited from:
IterableOps
def scanRight[B](z: B)(op: (A, B) => B): Traversal[B]
Inherited from:
IterableOps
def size: Int
Inherited from:
IterableOnceOps
def sizeCompare(that: Iterable[_]): Int
Inherited from:
IterableOps
def sizeCompare(otherSize: Int): Int
Inherited from:
IterableOps
@inline
final def sizeIs: SizeCompareOps
Inherited from:
IterableOps
def slice(from: Int, until: Int): Traversal[A]
Inherited from:
IterableOps
def sliding(size: Int, step: Int): Iterator[Traversal[A]]
Inherited from:
IterableOps
def sliding(size: Int): Iterator[Traversal[A]]
Inherited from:
IterableOps
def span(p: A => Boolean): (Traversal[A], Traversal[A])
Inherited from:
IterableOps
override def splitAt(n: Int): (Traversal[A], Traversal[A])
Definition Classes
IterableOps -> IterableOnceOps
Inherited from:
IterableOps
def stepper[S <: Stepper[_]](implicit shape: StepperShape[A, S]): S
Inherited from:
IterableOnce
def sum[B >: A](implicit num: Numeric[B]): B
Inherited from:
IterableOnceOps
def tail: Traversal[A]
Inherited from:
IterableOps
def tails: Iterator[Traversal[A]]
Inherited from:
IterableOps
def take(n: Int): Traversal[A]
Inherited from:
IterableOps
def takeRight(n: Int): Traversal[A]
Inherited from:
IterableOps
def takeWhile(p: A => Boolean): Traversal[A]
Inherited from:
IterableOps
override def tapEach[U](f: A => U): Traversal[A]
Definition Classes
IterableOps -> IterableOnceOps
Inherited from:
IterableOps
def to[C1](factory: Factory[A, C1]): C1
Inherited from:
IterableOnceOps
def toArray[B >: A : ClassTag]: Array[B]
Inherited from:
IterableOnceOps
@inline
final def toBuffer[B >: A]: Buffer[B]
Inherited from:
IterableOnceOps
def toIndexedSeq: IndexedSeq[A]
Inherited from:
IterableOnceOps
def toList: List[A]
Inherited from:
IterableOnceOps
def toMap[K, V](implicit ev: A <:< (K, V)): Map[K, V]
Inherited from:
IterableOnceOps
def toSeq: Seq[A]
Inherited from:
IterableOnceOps
def toSet[B >: A]: Set[B]
Inherited from:
IterableOnceOps
def toVector: Vector[A]
Inherited from:
IterableOnceOps
def transpose[B](implicit asIterable: A => Iterable[B]): Traversal[Traversal[B]]
Inherited from:
IterableOps
def unzip[A1, A2](implicit asPair: A => (A1, A2)): (Traversal[A1], Traversal[A2])
Inherited from:
IterableOps
def unzip3[A1, A2, A3](implicit asTriple: A => (A1, A2, A3)): (Traversal[A1], Traversal[A2], Traversal[A3])
Inherited from:
IterableOps
def view: View[A]
Inherited from:
IterableOps
def withFilter(p: A => Boolean): WithFilter[A, Traversal]
Inherited from:
IterableOps
def zip[B](that: IterableOnce[B]): Traversal[(A, B)]
Inherited from:
IterableOps
def zipAll[A1 >: A, B](that: Iterable[B], thisElem: A1, thatElem: B): Traversal[(A1, B)]
Inherited from:
IterableOps
def zipWithIndex: Traversal[(A, Int)]
Inherited from:
IterableOps

Deprecated and Inherited methods

@deprecated(message = "Use ++ instead of ++: for collections of type Iterable", since = "2.13.0")
def ++:[B >: A](that: IterableOnce[B]): Traversal[B]
Deprecated
[Since version 2.13.0] Use ++ instead of ++: for collections of type Iterable
Inherited from:
IterableOps
@inline @deprecated(message = "Use foldLeft instead of /:", since = "2.13.0")
final def /:[B](z: B)(op: (B, A) => B): B
Deprecated
[Since version 2.13.0] Use foldLeft instead of /:
Inherited from:
IterableOnceOps
@inline @deprecated(message = "Use foldRight instead of :\\", since = "2.13.0")
final def :\[B](z: B)(op: (A, B) => B): B
Deprecated
[Since version 2.13.0] Use foldRight instead of :\\
Inherited from:
IterableOnceOps
@deprecated(message = "`aggregate` is not relevant for sequential collections. Use `foldLeft(z)(seqop)` instead.", since = "2.13.0")
def aggregate[B](z: => B)(seqop: (B, A) => B, combop: (B, B) => B): B
Deprecated
[Since version 2.13.0] `aggregate` is not relevant for sequential collections. Use `foldLeft(z)(seqop)` instead.
Inherited from:
IterableOnceOps
@inline @deprecatedOverriding(message = "Use iterableFactory instead", since = "2.13.0") @deprecated(message = "Use iterableFactory instead", since = "2.13.0")
def companion: IterableFactory[Traversal]
Deprecated
[Since version 2.13.0] Use iterableFactory instead
Inherited from:
IterableOps
@inline @deprecated(message = "Use `dest ++= coll` instead", since = "2.13.0")
final def copyToBuffer[B >: A](dest: Buffer[B]): Unit
Deprecated
[Since version 2.13.0] Use `dest ++= coll` instead
Inherited from:
IterableOnceOps
@deprecated(message = "Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details)", since = "2.13.0")
def hasDefiniteSize: Boolean
Deprecated
[Since version 2.13.0] Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details)
Inherited from:
IterableOnceOps
@deprecated(message = "Use coll instead of repr in a collection implementation, use the collection value itself from the outside", since = "2.13.0")
final def repr: Traversal[A]
Deprecated
[Since version 2.13.0] Use coll instead of repr in a collection implementation, use the collection value itself from the outside
Inherited from:
IterableOps
@inline @deprecated(message = "Use .iterator instead of .toIterator", since = "2.13.0")
final def toIterator: Iterator[A]
Deprecated
[Since version 2.13.0] Use .iterator instead of .toIterator
Inherited from:
IterableOnceOps
@inline @deprecated(message = "Use .to(LazyList) instead of .toStream", since = "2.13.0")
final def toStream: Stream[A]
Deprecated
[Since version 2.13.0] Use .to(LazyList) instead of .toStream
Inherited from:
IterableOnceOps
@deprecated(message = "toTraversable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections", since = "2.13.0")
final def toTraversable: Iterable[A]
Deprecated
[Since version 2.13.0] toTraversable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections
Inherited from:
IterableOps
@deprecated(message = "Use .view.slice(from, until) instead of .view(from, until)", since = "2.13.0")
def view(from: Int, until: Int): View[A]
Deprecated
[Since version 2.13.0] Use .view.slice(from, until) instead of .view(from, until)
Inherited from:
IterableOps

Concrete fields

override val iterator: Iterator[A]
Implicitly added by toEdgeTraversal
Implicitly added by toElementTraversal
Implicitly added by toNodeTraversal