PathBuilder

scalax.collection.GraphTraversal.PathBuilder

A Builder for valid paths in this graph.

Nodes and edges may be added either alternating or node by node respectively edge by edge. Either way, the builder ensures that the added elements build a valid path.

A node addition fails if either the node to be added is already contained or the node is not a direct successor of the previously added node or of the target node of the previously added edge. An edge addition fails if either the edge to be added is is already contained or the edge is not an outgoing edge from the previously added node or of the target node of the previously added edge.

It is recommended using add instead of += to track failed additions.

Attributes

Graph
Supertypes
trait WalkBuilder
trait Clearable
class Object
trait Matchable
class Any
Show all
Known subtypes

Members list

Value members

Inherited methods

final def ++=(xs: IterableOnce[InnerElem]): Growable.this.type

Attributes

Inherited from:
Growable
final def +=(elem: InnerElem): Growable.this.type

Attributes

Inherited from:
Growable
final def +=(edge: EdgeT): WalkBuilder.this.type

Tries to add edge to the tail of the path/walk.

Tries to add edge to the tail of the path/walk.

Attributes

Inherited from:
WalkBuilder
final def +=(node: NodeT): WalkBuilder.this.type

Tries to add node to the tail of the path/walk.

Tries to add node to the tail of the path/walk.

Attributes

Inherited from:
WalkBuilder
def add(edge: EdgeT): Boolean

Tries to add edge to the tail of the path/walk.

Tries to add edge to the tail of the path/walk.

Attributes

Returns

Whether the addition was successful.

Inherited from:
WalkBuilder
def add(node: NodeT): Boolean

Tries to add node to the tail of the path/walk.

Tries to add node to the tail of the path/walk.

Attributes

Returns

Whether the addition was successful.

Inherited from:
WalkBuilder
final def add(elem: InnerElem): Boolean

Tries to add elem to the tail of the path/walk.

Tries to add elem to the tail of the path/walk.

Attributes

Returns

Whether the addition was successful.

Inherited from:
WalkBuilder

Attributes

Inherited from:
Growable
def addOne(elem: InnerElem): WalkBuilder.this.type

Tries to add elem to the tail of the path/walk.

Tries to add elem to the tail of the path/walk.

Attributes

Inherited from:
WalkBuilder
def clear(): Unit

Attributes

Inherited from:
Builder
def knownSize: Int

Attributes

Inherited from:
Growable
def mapResult[NewTo](f: Path => NewTo): Builder[A, NewTo]

Attributes

Inherited from:
Builder
def result(): To

Attributes

Inherited from:
Builder
final def sizeHint(coll: IterableOnce[_], delta: Int): Unit

Attributes

Inherited from:
Builder

Attributes

Inherited from:
Builder

Attributes

Inherited from:
Builder
def start: NodeT

The node this walk starts at.

The node this walk starts at.

Attributes

Inherited from:
WalkBuilder

Deprecated and Inherited methods

final def +=(elem1: InnerElem, elem2: InnerElem, elems: InnerElem*): Growable.this.type

Attributes

Deprecated
[Since version 2.13.0] Use `++=` aka `addAll` instead of varargs `+=`; infix operations with an operand of multiple args will be deprecated
Inherited from:
Growable