/** * Adds {@code node} to the graph and returns the associated {@link GraphConnections}. * * @throws IllegalStateException if {@code node} is already present */ @CanIgnoreReturnValue private GraphConnections<N, V> addNodeInternal(N node) { GraphConnections<N, V> connections = newConnections(); checkState(nodeConnections.put(node, connections) == null); return connections; }
/** * Adds {@code node} to the graph and returns the associated {@link GraphConnections}. * * @throws IllegalStateException if {@code node} is already present */ @CanIgnoreReturnValue private GraphConnections<N, V> addNodeInternal(N node) { GraphConnections<N, V> connections = newConnections(); checkState(nodeConnections.put(node, connections) == null); return connections; }
/** * Adds {@code node} to the graph and returns the associated {@link GraphConnections}. * * @throws IllegalStateException if {@code node} is already present */ @CanIgnoreReturnValue private GraphConnections<N, V> addNodeInternal(N node) { GraphConnections<N, V> connections = newConnections(); checkState(nodeConnections.put(node, connections) == null); return connections; }
/** * Adds {@code node} to the graph and returns the associated {@link GraphConnections}. * * @throws IllegalStateException if {@code node} is already present */ @CanIgnoreReturnValue private GraphConnections<N, V> addNodeInternal(N node) { GraphConnections<N, V> connections = newConnections(); checkState(nodeConnections.put(node, connections) == null); return connections; }
/** * Adds {@code node} to the graph and returns the associated {@link GraphConnections}. * * @throws IllegalStateException if {@code node} is already present */ @CanIgnoreReturnValue private GraphConnections<N, V> addNodeInternal(N node) { GraphConnections<N, V> connections = newConnections(); checkState(nodeConnections.put(node, connections) == null); return connections; }