Package dev.hypera.chameleon.util.graph
Interface Graph.Builder<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull Graph.Builder<T>allowSelfLoops()Allow self-loops.@NotNull Graph.Builder<T>allowSelfLoops(boolean allowSelfLoops)Sets whether this graph should allow self-loops.@NotNull Graph<T>build()Build graph.
-
-
-
Method Detail
-
allowSelfLoops
@Contract("-> this") @NotNull @NotNull Graph.Builder<T> allowSelfLoops()Allow self-loops.- Returns:
this.
-
allowSelfLoops
@Contract("_ -> this") @NotNull @NotNull Graph.Builder<T> allowSelfLoops(boolean allowSelfLoops)Sets whether this graph should allow self-loops.Attempting to add a self-loop to a graph with self-loops not allowed will cause an IllegalArgumentException to be thrown.
Defaults to
false.- Parameters:
allowSelfLoops- Whether self-loops should be allowed.- Returns:
this.
-
-