Specifies the expected number of nodes in the graph. @throws IllegalArgumentException if expectedNodeCount is negative
(int expectedNodeCount)
| 110 | |
| 111 | |
| 112 | public GraphBuilder<N> expectedNodeCount(int expectedNodeCount) { |
| 113 | checkArgument(expectedNodeCount >= 0, |
| 114 | "The expected number of nodes can't be negative: %s", |
| 115 | expectedNodeCount); |
| 116 | this.expectedNodeCount = Optional.of(expectedNodeCount); |
| 117 | return this; |
| 118 | } |
| 119 | |
| 120 | /** |
| 121 | * Returns an empty {@link MutableGraph} with the properties of this {@link GraphBuilder}. |
no test coverage detected