public static class DefaultGraphType.Builder extends Object
DefaultGraphType
.Constructor and Description |
---|
Builder()
Construct a new Builder.
|
Builder(GraphType type)
Construct a new Builder.
|
Modifier and Type | Method and Description |
---|---|
DefaultGraphType.Builder |
allowCycles(boolean value)
Set whether the graph will allow cycles.
|
DefaultGraphType.Builder |
allowMultipleEdges(boolean value)
Set whether to allow multiple edges.
|
DefaultGraphType.Builder |
allowSelfLoops(boolean value)
Set whether to allow self-loops.
|
DefaultGraphType |
build()
Build the type.
|
DefaultGraphType.Builder |
directed()
Set the type as directed.
|
DefaultGraphType.Builder |
mixed()
Set the type as mixed.
|
DefaultGraphType.Builder |
modifiable(boolean value)
Set whether the graph is modifiable.
|
DefaultGraphType.Builder |
undirected()
Set the type as undirected.
|
DefaultGraphType.Builder |
weighted(boolean value)
Set whether the graph will be weighted.
|
public Builder()
public Builder(GraphType type)
type
- the type to base the builderpublic DefaultGraphType.Builder directed()
public DefaultGraphType.Builder undirected()
public DefaultGraphType.Builder mixed()
public DefaultGraphType.Builder allowSelfLoops(boolean value)
value
- if true self-values are allowed, otherwise notpublic DefaultGraphType.Builder allowMultipleEdges(boolean value)
value
- if true multiple edges are allowed, otherwise notpublic DefaultGraphType.Builder weighted(boolean value)
value
- if true the graph will be weighted, otherwise unweightedpublic DefaultGraphType.Builder allowCycles(boolean value)
value
- if true the graph will allow cycles, otherwise notpublic DefaultGraphType.Builder modifiable(boolean value)
value
- if true the graph will be modifiable, otherwise notpublic DefaultGraphType build()
Copyright © 2017. All rights reserved.