mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
36 lines
1.3 KiB
Java
36 lines
1.3 KiB
Java
package com.google.common.graph;
|
|
|
|
import com.google.common.collect.BiMap;
|
|
import com.google.common.collect.HashBiMap;
|
|
import com.google.common.collect.ImmutableBiMap;
|
|
import java.util.Collections;
|
|
import java.util.Map;
|
|
import java.util.Set;
|
|
|
|
@ElementTypesAreNonnullByDefault
|
|
/* loaded from: classes3.dex */
|
|
final class UndirectedNetworkConnections<N, E> extends AbstractUndirectedNetworkConnections<N, E> {
|
|
UndirectedNetworkConnections(Map<E, N> map) {
|
|
super(map);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public static <N, E> UndirectedNetworkConnections<N, E> of() {
|
|
return new UndirectedNetworkConnections<>(HashBiMap.create(2));
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public static <N, E> UndirectedNetworkConnections<N, E> ofImmutable(Map<E, N> map) {
|
|
return new UndirectedNetworkConnections<>(ImmutableBiMap.copyOf((Map) map));
|
|
}
|
|
|
|
@Override // com.google.common.graph.NetworkConnections
|
|
public Set<N> adjacentNodes() {
|
|
return Collections.unmodifiableSet(((BiMap) this.incidentEdgeMap).values());
|
|
}
|
|
|
|
@Override // com.google.common.graph.NetworkConnections
|
|
public Set<E> edgesConnecting(N n) {
|
|
return new EdgesConnecting(((BiMap) this.incidentEdgeMap).inverse(), n);
|
|
}
|
|
}
|