Builder

scalax.collection.mutable.Builder
class Builder[N, E <: Edge[N], +CC <: ([N, E <: Edge[N]] =>> GraphLike[N, E, CC] & AnyGraph[N, E])](companion: Factory[CC])(implicit config: GraphConfig)

Attributes

Graph
Supertypes
trait AbstractBuilder[N, E]
trait Growable[N, E]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def result: CC[N, E]

Inherited methods

def ++=(nodes: Iterable[N], edges: Iterable[E]): Growable.this.type

Adds all passed nodes and edges to this graph. For a mutable Graph see also unionInPlace.

Adds all passed nodes and edges to this graph. For a mutable Graph see also unionInPlace.

Attributes

Inherited from:
Growable
def ++=(xs: Iterable[OuterElem[N, E]]): Growable.this.type

Alias for addAll(xs).

Alias for addAll(xs).

Attributes

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

Alias for addOne(edge).

Alias for addOne(edge).

Attributes

Inherited from:
Growable
final def +=(node: N): Growable.this.type

Alias for addOne(node).

Alias for addOne(node).

Attributes

Inherited from:
Growable
def add(edge: E): Boolean

Adds a single edge to this graph.

Adds a single edge to this graph.

Attributes

Returns

true if this graph has not contained edge before.

Inherited from:
BuilderImpl (hidden)
protected def add(node: N): Boolean

Adds a single node to this graph.

Adds a single node to this graph.

Attributes

Returns

true if this graph has not contained node before.

Inherited from:
BuilderImpl (hidden)
def addAll(xs: Iterable[OuterElem[N, E]]): Growable.this.type

Adds all elements produced by outer to this graph. For a graph see also unionInPlace.

Adds all elements produced by outer to this graph. For a graph see also unionInPlace.

Attributes

Inherited from:
Growable
final override def addOne(edge: E): BuilderImpl.this.type

Adds a single node to this graph.

Adds a single node to this graph.

Attributes

Definition Classes
BuilderImpl -> Growable
Inherited from:
BuilderImpl (hidden)
final override def addOne(node: N): BuilderImpl.this.type

Adds a single node to this graph.

Adds a single node to this graph.

Attributes

Definition Classes
BuilderImpl -> Growable
Inherited from:
BuilderImpl (hidden)
def clear(): Unit

Attributes

Inherited from:
BuilderImpl (hidden)
def upsert(edge: E): Boolean

If an inner edge equaling to edge is present in this graph, it is replaced by edge, otherwise edge will be inserted. This is useful if non-key parts of an immutable edge are to be modified.

If an inner edge equaling to edge is present in this graph, it is replaced by edge, otherwise edge will be inserted. This is useful if non-key parts of an immutable edge are to be modified.

Attributes

Returns

true if edge has been inserted, false if it has been replaced.

Inherited from:
BuilderImpl (hidden)

Inherited fields

protected val edges: ArrayBuffer[E]

Attributes

Inherited from:
BuilderImpl (hidden)
protected val nodes: ArrayBuffer[N]

Attributes

Inherited from:
BuilderImpl (hidden)