本文整理了Java中com.google.common.graph.Network.edgeConnectingOrNull()
方法的一些代码示例,展示了Network.edgeConnectingOrNull()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Network.edgeConnectingOrNull()
方法的具体详情如下:
包路径:com.google.common.graph.Network
类名称:Network
方法名:edgeConnectingOrNull
[英]Returns the single edge that directly connects endpoints (in the order, if any, specified by endpoints), if one is present, or null if no such edge exists.
If this graph is directed, the endpoints must be ordered.
[中]返回直接连接端点的单条边(如果有,按端点指定的顺序),如果存在,则返回;如果不存在这样的边,则返回null。
如果此图是定向的,则端点必须有序。
代码示例来源:origin: google/guava
@Override
public E edgeConnectingOrNull(N nodeU, N nodeV) {
return delegate().edgeConnectingOrNull(nodeU, nodeV);
}
代码示例来源:origin: google/guava
@Override
public E edgeConnectingOrNull(EndpointPair<N> endpoints) {
return delegate().edgeConnectingOrNull(endpoints);
}
代码示例来源:origin: google/guava
@Override
public E edgeConnectingOrNull(N nodeU, N nodeV) {
return delegate().edgeConnectingOrNull(nodeV, nodeU); // transpose
}
代码示例来源:origin: google/j2objc
@Override
public E edgeConnectingOrNull(N nodeU, N nodeV) {
return delegate().edgeConnectingOrNull(nodeV, nodeU); // transpose
}
代码示例来源:origin: google/j2objc
@Override
public E edgeConnectingOrNull(N nodeU, N nodeV) {
return delegate().edgeConnectingOrNull(nodeU, nodeV);
}
代码示例来源:origin: google/guava
@Override
public E edgeConnectingOrNull(EndpointPair<N> endpoints) {
return delegate().edgeConnectingOrNull(transpose(endpoints));
}
代码示例来源:origin: wildfly/wildfly
@Override
public E edgeConnectingOrNull(N nodeU, N nodeV) {
return delegate().edgeConnectingOrNull(nodeV, nodeU); // transpose
}
代码示例来源:origin: wildfly/wildfly
@Override
public E edgeConnectingOrNull(N nodeU, N nodeV) {
return delegate().edgeConnectingOrNull(nodeU, nodeV);
}
代码示例来源:origin: google/guava
assertThat(transpose.edgeConnectingOrNull(N1, N2)).isNull();
assertThat(transpose.edgeConnectingOrNull(N1, N2)).isEqualTo(E21);
AbstractNetworkTest.validateNetwork(transpose);
代码示例来源:origin: google/guava
switch (edgesConnecting.size()) {
case 0:
assertThat(network.edgeConnectingOrNull(node, otherNode)).isNull();
assertThat(network.edgeConnecting(node, otherNode).isPresent()).isFalse();
assertThat(network.hasEdgeConnecting(node, otherNode)).isFalse();
case 1:
E edge = edgesConnecting.iterator().next();
assertThat(network.edgeConnectingOrNull(node, otherNode)).isEqualTo(edge);
assertThat(network.edgeConnecting(node, otherNode).get()).isEqualTo(edge);
assertThat(network.hasEdgeConnecting(node, otherNode)).isTrue();
assertThat(network.hasEdgeConnecting(node, otherNode)).isTrue();
try {
network.edgeConnectingOrNull(node, otherNode);
fail();
} catch (IllegalArgumentException expected) {
代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger
@Override
public E edgeConnectingOrNull(N nodeU, N nodeV) {
return delegate().edgeConnectingOrNull(nodeV, nodeU); // transpose
}
代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger
@Override
public E edgeConnectingOrNull(N nodeU, N nodeV) {
return delegate().edgeConnectingOrNull(nodeU, nodeV);
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
@Override
public E edgeConnectingOrNull(N nodeU, N nodeV) {
return delegate().edgeConnectingOrNull(nodeU, nodeV);
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
@Override
public E edgeConnectingOrNull(N nodeU, N nodeV) {
return delegate().edgeConnectingOrNull(nodeV, nodeU); // transpose
}
代码示例来源:origin: com.google.guava/guava-tests
assertThat(transpose.edgeConnectingOrNull(N1, N2)).isNull();
assertThat(transpose.edgeConnectingOrNull(N1, N2)).isEqualTo(E21);
AbstractNetworkTest.validateNetwork(transpose);
代码示例来源:origin: com.google.guava/guava-tests
switch (edgesConnecting.size()) {
case 0:
assertThat(network.edgeConnectingOrNull(node, otherNode)).isNull();
assertThat(network.edgeConnecting(node, otherNode).isPresent()).isFalse();
assertThat(network.hasEdgeConnecting(node, otherNode)).isFalse();
case 1:
E edge = edgesConnecting.iterator().next();
assertThat(network.edgeConnectingOrNull(node, otherNode)).isEqualTo(edge);
assertThat(network.edgeConnecting(node, otherNode).get()).isEqualTo(edge);
assertThat(network.hasEdgeConnecting(node, otherNode)).isTrue();
assertThat(network.hasEdgeConnecting(node, otherNode)).isTrue();
try {
network.edgeConnectingOrNull(node, otherNode);
fail();
} catch (IllegalArgumentException expected) {}
内容来源于网络,如有侵权,请联系作者删除!