@Test public void testGetNeighborsNonExistentNode() { OspfNeighborConfigId n = new OspfNeighborConfigId( "h1", "vrf1", "p", "i1", ConcreteInterfaceAddress.parse("192.0.2.8/31")); assertThat(nonTrivialTopology().neighbors(n), empty()); }
@Nonnull public Set<OspfNeighborConfigId> neighbors(OspfNeighborConfigId node) { if (!_graph.nodes().contains(node)) { return ImmutableSet.of(); } return _graph.adjacentNodes(node); }
CandidateOspfTopology { @Nonnull public Set<OspfNeighborConfigId> neighbors(OspfNeighborConfigId node) { if (!_graph.nodes().contains(node)) { return ImmutableSet.of(); } return _graph.adjacentNodes(node); } }
CandidateOspfTopology { @Nonnull public Set<OspfNeighborConfigId> neighbors(OspfNeighborConfigId node) { if (!_graph.nodes().contains(node)) { return ImmutableSet.of(); } return _graph.adjacentNodes(node); } CandidateOspfTopology(ValueGraph<OspfNeighborConfigId, OspfSessionStatus> graph); }
CandidateOspfTopology { @Nonnull public Set<OspfNeighborConfigId> neighbors(OspfNeighborConfigId node) { if (!_graph.nodes().contains(node)) { return ImmutableSet.of(); } return _graph.adjacentNodes(node); } CandidateOspfTopology(ValueGraph<OspfNeighborConfigId, OspfSessionStatus> graph); @Nonnull Optional<OspfSessionStatus> getSessionStatus(
      OspfNeighborConfigId n, OspfNeighborConfigId n1); @Nonnull Set<OspfNeighborConfigId> neighbors(OspfNeighborConfigId node); }
CandidateOspfTopology { @Nonnull public Set<OspfNeighborConfigId> neighbors(OspfNeighborConfigId node) { if (!_graph.nodes().contains(node)) { return ImmutableSet.of(); } return _graph.adjacentNodes(node); } CandidateOspfTopology(ValueGraph<OspfNeighborConfigId, OspfSessionStatus> graph); @Nonnull Optional<OspfSessionStatus> getSessionStatus(
      OspfNeighborConfigId n, OspfNeighborConfigId n1); @Nonnull Set<OspfNeighborConfigId> neighbors(OspfNeighborConfigId node); static final CandidateOspfTopology EMPTY; }