WalkBuilder

scalax.collection.GraphTraversal.WalkBuilder
trait WalkBuilder extends Builder[InnerElem, Walk]

A Builder for valid walks 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 walk.

A node addition fails if the node to be added 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 the edge to be added 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 Clearable
class Object
trait Matchable
class Any
Show all
Known subtypes

Members list

Value members

Abstract methods

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.

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.

def start: NodeT

The node this walk starts at.

The node this walk starts at.

Attributes

Concrete methods

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

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

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.

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 methods

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

Attributes

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

Attributes

Inherited from:
Growable

Attributes

Inherited from:
Growable
def clear(): Unit

Attributes

Inherited from:
Builder
def knownSize: Int

Attributes

Inherited from:
Growable
def mapResult[NewTo](f: Walk => 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

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