com.google.common.graph.Network.edgeConnecting()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(153)

本文整理了Java中com.google.common.graph.Network.edgeConnecting()方法的一些代码示例,展示了Network.edgeConnecting()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Network.edgeConnecting()方法的具体详情如下:
包路径:com.google.common.graph.Network
类名称:Network
方法名:edgeConnecting

Network.edgeConnecting介绍

[英]Returns the single edge that directly connects endpoints (in the order, if any, specified by endpoints), if one is present, or Optional.empty() if no such edge exists.

If this graph is directed, the endpoints must be ordered.
[中]返回直接连接端点的单条边(如果有,按端点指定的顺序),如果有,或可选。如果不存在这样的边,则为空()。
如果此图是定向的,则端点必须有序。

代码示例

代码示例来源:origin: google/guava

@Override
public Optional<E> edgeConnecting(N nodeU, N nodeV) {
 return delegate().edgeConnecting(nodeU, nodeV);
}

代码示例来源:origin: google/guava

assertThat(transpose.edgeConnecting(N1, N2).isPresent()).isFalse();
assertThat(transpose.edgeConnectingOrNull(N1, N2)).isNull();
assertThat(transpose.edgeConnecting(N1, N2).get()).isEqualTo(E21);
assertThat(transpose.edgeConnectingOrNull(N1, N2)).isEqualTo(E21);
AbstractNetworkTest.validateNetwork(transpose);

代码示例来源:origin: google/guava

case 0:
 assertThat(network.edgeConnectingOrNull(node, otherNode)).isNull();
 assertThat(network.edgeConnecting(node, otherNode).isPresent()).isFalse();
 assertThat(network.hasEdgeConnecting(node, otherNode)).isFalse();
 break;
 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();
 break;
  network.edgeConnecting(node, otherNode);
  fail();
 } catch (IllegalArgumentException expected) {

代码示例来源:origin: google/guava

@Override
public Optional<E> edgeConnecting(N nodeU, N nodeV) {
 return delegate().edgeConnecting(nodeV, nodeU); // transpose
}

代码示例来源:origin: com.google.guava/guava-tests

assertThat(transpose.edgeConnecting(N1, N2).isPresent()).isFalse();
assertThat(transpose.edgeConnectingOrNull(N1, N2)).isNull();
assertThat(transpose.edgeConnecting(N1, N2).get()).isEqualTo(E21);
assertThat(transpose.edgeConnectingOrNull(N1, N2)).isEqualTo(E21);
AbstractNetworkTest.validateNetwork(transpose);

代码示例来源:origin: google/guava

@Override
public Optional<E> edgeConnecting(EndpointPair<N> endpoints) {
 return delegate().edgeConnecting(endpoints);
}

代码示例来源:origin: com.google.guava/guava-tests

case 0:
 assertThat(network.edgeConnectingOrNull(node, otherNode)).isNull();
 assertThat(network.edgeConnecting(node, otherNode).isPresent()).isFalse();
 assertThat(network.hasEdgeConnecting(node, otherNode)).isFalse();
 break;
 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();
 break;
 } catch (IllegalArgumentException expected) {}
 try {
  network.edgeConnecting(node, otherNode);
  fail();
 } catch (IllegalArgumentException expected) {}

代码示例来源:origin: google/guava

@Override
public Optional<E> edgeConnecting(EndpointPair<N> endpoints) {
 return delegate().edgeConnecting(transpose(endpoints));
}

代码示例来源:origin: wildfly/wildfly

@Override
public Optional<E> edgeConnecting(N nodeU, N nodeV) {
 return delegate().edgeConnecting(nodeV, nodeU); // transpose
}

代码示例来源:origin: wildfly/wildfly

@Override
public Optional<E> edgeConnecting(N nodeU, N nodeV) {
 return delegate().edgeConnecting(nodeU, nodeV);
}

代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

@Override
public Optional<E> edgeConnecting(N nodeU, N nodeV) {
 return delegate().edgeConnecting(nodeU, nodeV);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

@Override
public Optional<E> edgeConnecting(N nodeU, N nodeV) {
 return delegate().edgeConnecting(nodeV, nodeU); // transpose
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

@Override
public Optional<E> edgeConnecting(N nodeU, N nodeV) {
 return delegate().edgeConnecting(nodeU, nodeV);
}

代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

@Override
public Optional<E> edgeConnecting(N nodeU, N nodeV) {
 return delegate().edgeConnecting(nodeV, nodeU); // transpose
}

相关文章