com.github.rinde.rinsim.geom.Graph.removeConnectionData()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(121)

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

Graph.removeConnectionData介绍

[英]Remove connection data. Precondition: connection from -> to exists.
[中]删除连接数据。前提条件:存在从->到的连接。

代码示例

代码示例来源:origin: com.github.rinde/rinsim-geom

@Override
public Optional<E> removeConnectionData(Point from, Point to) {
 return delegate.removeConnectionData(from, to);
}

代码示例来源:origin: rinde/RinSim

@Override
public Optional<E> removeConnectionData(Point from, Point to) {
 return delegate.removeConnectionData(from, to);
}

代码示例来源:origin: com.github.rinde/rinsim-geom

@Override
public Optional<E> removeConnectionData(Point from, Point to) {
 final Optional<E> val = delegate.removeConnectionData(from, to);
 eventDispatcher.dispatchEvent(new GraphEvent(
  EventTypes.CHANGE_CONNECTION_DATA, this, getConnection(from, to)));
 return val;
}

代码示例来源:origin: rinde/RinSim

@Override
public Optional<E> removeConnectionData(Point from, Point to) {
 final Optional<E> val = delegate.removeConnectionData(from, to);
 eventDispatcher.dispatchEvent(new GraphEvent(
  EventTypes.CHANGE_CONNECTION_DATA, this, getConnection(from, to)));
 return val;
}

代码示例来源:origin: rinde/RinSim

@Test
public void setConnData() {
 final Point N = new Point(0, 5);
 final Point E = new Point(5, 0);
 final Point S = new Point(0, -5);
 final Point W = new Point(-5, 0);
 Graphs.addBiPath(graph, N, E, S, W, N);
 assertFalse(graph.setConnectionData(N, E, LengthData.create(100))
  .isPresent());
 assertEquals(LengthData.create(100),
  graph.removeConnectionData(N, E).get());
}

相关文章