c

overflowdb.traversal

TraversalLogicExt

final class TraversalLogicExt[A] extends AnyVal

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TraversalLogicExt
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new TraversalLogicExt(iterator: Iterator[A])

Type Members

  1. type Traversal[A] = Iterator[A]

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##: Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. 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.

    Annotations
    @Doc()
    Example:
    1. .and(_.label("someLabel"), _.has("someProperty"))
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. 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.

    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, ...

    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

    on

    Traversal to get to what you want to match on

    options

    PartialFunction from the matched element to the resulting traversal

    Annotations
    @Doc()
    Example:
    1. .choose(_.property(Name)) {
        case "L1" => _.out
        case "R1" => _.repeat(_.out)(_.maxDepth(3))
        case _ => _.in
      }
    See also

    LogicalStepsTests

  7. def coalesce[NewEnd](options: (Traversal[A]) => Traversal[NewEnd]*): Traversal[NewEnd]
    Annotations
    @Doc()
  8. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  9. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  10. val iterator: Iterator[A]
  11. 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

    Annotations
    @Doc()
  12. 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.

    Annotations
    @Doc()
    Example:
    1. .or(_.label("someLabel"), _.has("someProperty"))
  13. def sideEffect(fun: Function1[A, _]): Traversal[A]

    perform side effect without changing the contents of the traversal

    perform side effect without changing the contents of the traversal

    Annotations
    @Doc()
  14. def sideEffectPF(pf: PartialFunction[A, _]): 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

    Annotations
    @Doc()
  15. def toString(): String
    Definition Classes
    Any
  16. def union[B](traversals: (Traversal[A]) => Traversal[B]*): Traversal[B]

    union step from the current point

    union step from the current point

    traversals

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

    Annotations
    @Doc()
    Example:
    1. .union(_.out, _.in)
  17. 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

    Annotations
    @Doc()
  18. 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

    Annotations
    @Doc()

Inherited from AnyVal

Inherited from Any

Ungrouped