- Companion:
- object
Value members
Concrete methods
Inherited methods
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
- Inherited from:
- Traversal
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"))
- Inherited from:
- Traversal
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
- Inherited from:
- Traversal
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 }
- Inherited from:
- Traversal
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") )
- Inherited from:
- Traversal
collects and all elements of the given type
collects and all elements of the given type
- Inherited from:
- Traversal
- Inherited from:
- IterableOnceOps
- Inherited from:
- IterableOnceOps
- Inherited from:
- Traversal
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
- Inherited from:
- Traversal
group elements and count how often they appear
group elements and count how often they appear
- Inherited from:
- Traversal
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
- Inherited from:
- Traversal
- Inherited from:
- Traversal
Execute the traversal without returning anything
Execute the traversal without returning anything
- Inherited from:
- Traversal
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
- Inherited from:
- Traversal
- Inherited from:
- IterableOnceOps
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
- Inherited from:
- Traversal
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"))
- Inherited from:
- Traversal
perform side effect without changing the contents of the traversal
perform side effect without changing the contents of the traversal
- Inherited from:
- Traversal
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
- Inherited from:
- Traversal
sort elements by the value of the given transformation function
sort elements by the value of the given transformation function
- Inherited from:
- Traversal
sort elements by their natural order
sort elements by their natural order
- Inherited from:
- Traversal
Execute the traversal and convert the result to an immutable Set
Execute the traversal and convert the result to an immutable Set
- Inherited from:
- Traversal
Execute the traversal and return a mutable.Set (better performance than immutableSet
)
Execute the traversal and return a mutable.Set (better performance than immutableSet
)
- Inherited from:
- Traversal
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)
- Inherited from:
- Traversal
only preserves elements if the provided traversal has at least one result
only preserves elements if the provided traversal has at least one result
- Inherited from:
- Traversal
only preserves elements if the provided traversal does not have any results
only preserves elements if the provided traversal does not have any results
- Inherited from:
- Traversal
filters out all elements that are not in the provided set
filters out all elements that are not in the provided set
- Inherited from:
- Traversal
filters out all elements that are in the provided set
filters out all elements that are in the provided set
- Inherited from:
- Traversal
Deprecated and Inherited methods
- Deprecated
[Since version 2.13.0]
Use ++ instead of ++: for collections of type Iterable- Inherited from:
- IterableOps
- Deprecated
[Since version 2.13.0]
Use foldLeft instead of /:- Inherited from:
- IterableOnceOps
- Deprecated
[Since version 2.13.0]
Use foldRight instead of :\\- Inherited from:
- IterableOnceOps
- Deprecated
[Since version 2.13.0]
`aggregate` is not relevant for sequential collections. Use `foldLeft(z)(seqop)` instead.- Inherited from:
- IterableOnceOps
- Deprecated
[Since version 2.13.0]
Use iterableFactory instead- Inherited from:
- IterableOps
- Deprecated
[Since version 2.13.0]
Use `dest ++= coll` instead- Inherited from:
- IterableOnceOps
- Deprecated
[Since version 2.13.0]
Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details)- Inherited from:
- IterableOnceOps
- 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
- Deprecated
[Since version 2.13.0]
Use .iterator instead of .toIterator- Inherited from:
- IterableOnceOps
- Deprecated
[Since version 2.13.0]
Use .to(LazyList) instead of .toStream- Inherited from:
- IterableOnceOps
- 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