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

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

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

Network.hasEdgeConnecting介绍

[英]Returns true if there is an edge that directly connects endpoints (in the order, if any, specified by endpoints).

Unlike the other EndpointPair-accepting methods, this method does not throw if the endpoints are unordered and the graph is directed; it simply returns false. This is for consistency with Graph#hasEdgeConnecting(EndpointPair) and ValueGraph#hasEdgeConnecting(EndpointPair).
[中]如果存在直接连接端点的边(按端点指定的顺序,如果有),则返回true。
与其他端点对接受方法不同,如果端点无序且图形有方向,此方法不会抛出;它只是返回false。这是为了与Graph#HasEdgeConnection(EndpointPair)和ValueGraph#HasEdgeConnection(EndpointPair)保持一致。

代码示例

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

@Override
 public boolean hasEdgeConnecting(EndpointPair<N> endpoints) {
  return delegate().hasEdgeConnecting(endpoints);
 }
}

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

@Override
public boolean hasEdgeConnecting(N nodeU, N nodeV) {
 return delegate().hasEdgeConnecting(nodeV, nodeU); // transpose
}

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

@Override
public boolean hasEdgeConnecting(N nodeU, N nodeV) {
 return delegate().hasEdgeConnecting(nodeU, nodeV);
}

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

@Override
 public boolean hasEdgeConnecting(N nodeU, N nodeV) {
  return delegate().hasEdgeConnecting(nodeV, nodeU); // transpose
 }
}

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

@Override
 public boolean hasEdgeConnecting(N nodeU, N nodeV) {
  return delegate().hasEdgeConnecting(nodeU, nodeV);
 }
}

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

@Override
 public boolean hasEdgeConnecting(EndpointPair<N> endpoints) {
  return delegate().hasEdgeConnecting(transpose(endpoints));
 }
}

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

@Override
 public boolean hasEdgeConnecting(N nodeU, N nodeV) {
  return delegate().hasEdgeConnecting(nodeV, nodeU); // transpose
 }
}

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

@Override
 public boolean hasEdgeConnecting(N nodeU, N nodeV) {
  return delegate().hasEdgeConnecting(nodeU, nodeV);
 }
}

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

assertThat(network.edgeConnectingOrNull(node, otherNode)).isNull();
 assertThat(network.edgeConnecting(node, otherNode).isPresent()).isFalse();
 assertThat(network.hasEdgeConnecting(node, otherNode)).isFalse();
 break;
case 1:
 assertThat(network.edgeConnectingOrNull(node, otherNode)).isEqualTo(edge);
 assertThat(network.edgeConnecting(node, otherNode).get()).isEqualTo(edge);
 assertThat(network.hasEdgeConnecting(node, otherNode)).isTrue();
 break;
default:
 assertThat(network.hasEdgeConnecting(node, otherNode)).isTrue();
 try {
  network.edgeConnectingOrNull(node, otherNode);

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

@Override
 public boolean hasEdgeConnecting(N nodeU, N nodeV) {
  return delegate().hasEdgeConnecting(nodeV, nodeU); // transpose
 }
}

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

@Override
 public boolean hasEdgeConnecting(N nodeU, N nodeV) {
  return delegate().hasEdgeConnecting(nodeU, nodeV);
 }
}

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

@Override
 public boolean hasEdgeConnecting(N nodeU, N nodeV) {
  return delegate().hasEdgeConnecting(nodeV, nodeU); // transpose
 }
}

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

@Override
 public boolean hasEdgeConnecting(N nodeU, N nodeV) {
  return delegate().hasEdgeConnecting(nodeU, nodeV);
 }
}

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

assertThat(network.edgeConnectingOrNull(node, otherNode)).isNull();
 assertThat(network.edgeConnecting(node, otherNode).isPresent()).isFalse();
 assertThat(network.hasEdgeConnecting(node, otherNode)).isFalse();
 break;
case 1:
 assertThat(network.edgeConnectingOrNull(node, otherNode)).isEqualTo(edge);
 assertThat(network.edgeConnecting(node, otherNode).get()).isEqualTo(edge);
 assertThat(network.hasEdgeConnecting(node, otherNode)).isTrue();
 break;
default:
 assertThat(network.hasEdgeConnecting(node, otherNode)).isTrue();
 try {
  network.edgeConnectingOrNull(node, otherNode);

相关文章