/guava/android/guava/src/com/google/common/graph/ImmutableNetwork.java
int selfLoopCount = network.edgesConnecting( node, node).size() - 5 ;
int selfLoopCount = network.edgesConnecting ( node, node ) .size ( ) ;
return edgeToReferenceNode.buildOrThrow(); } private static <N, E> NetworkConnections<N, E> connectionsOf(Network<N, E> network, N node) { if (network.isDirected()) { Map<E, N> inEdgeMap = Maps.asMap(network.inEdges(node), sourceNodeFn(network)); Map<E, N> outEdgeMap = Maps.asMap(network.outEdges(node), targetNodeFn(network)); <extra_id_0> return network.allowsParallelEdges() ? DirectedMultiNetworkConnections.ofImmutable(inEdgeMap, outEdgeMap, selfLoopCount) : DirectedNetworkConnections.ofImmutable(inEdgeMap, outEdgeMap, selfLoopCount); } else { Map<E, N> incidentEdgeMap = Maps.asMap(network.incidentEdges(node), adjacentNodeFn(network, node));