@Test public void testEdgeIdReverse() { OspfNeighborConfigId n = new OspfNeighborConfigId( "h1", "vrf1", "p", "i1", ConcreteInterfaceAddress.parse("192.0.2.0/31")); OspfNeighborConfigId n2 = new OspfNeighborConfigId( "h2", "vrf2", "p", "i2", ConcreteInterfaceAddress.parse("192.0.2.1/31")); EdgeId edgeId = OspfTopology.makeEdge(n, n2); assertThat(edgeId.reverse(), equalTo(OspfTopology.makeEdge(n2, n))); }
public static EdgeId makeEdge(OspfNeighborConfigId tail, OspfNeighborConfigId head) { return new EdgeId(tail, head); }
OspfTopology { public static EdgeId makeEdge(OspfNeighborConfigId tail, OspfNeighborConfigId head) { return new EdgeId(tail, head); } }
OspfTopology { public static EdgeId makeEdge(OspfNeighborConfigId tail, OspfNeighborConfigId head) { return new EdgeId(tail, head); } OspfTopology(ValueGraph<OspfNeighborConfigId, OspfSessionProperties> graph); }
OspfTopology { public static EdgeId makeEdge(OspfNeighborConfigId tail, OspfNeighborConfigId head) { return new EdgeId(tail, head); } OspfTopology(ValueGraph<OspfNeighborConfigId, OspfSessionProperties> graph); @Nonnull Set<OspfNeighborConfigId> neighbors(OspfNeighborConfigId node); @Nonnull Set<EdgeId> edges(); @JsonProperty(PROP_NODES) @Nonnull Set<OspfNeighborConfigId> getNodes(); @Nonnull Optional<OspfSessionProperties> getSession(EdgeId id); @Nonnull Set<EdgeId> incomingEdges(OspfNeighborConfigId head); static EdgeId makeEdge(OspfNeighborConfigId tail, OspfNeighborConfigId head); @Override boolean equals(@Nullable Object o); @JsonIgnore ValueGraph<OspfNeighborConfigId, OspfSessionProperties> getGraph(); @Override int hashCode(); }
OspfTopology { public static EdgeId makeEdge(OspfNeighborConfigId tail, OspfNeighborConfigId head) { return new EdgeId(tail, head); } OspfTopology(ValueGraph<OspfNeighborConfigId, OspfSessionProperties> graph); @Nonnull Set<OspfNeighborConfigId> neighbors(OspfNeighborConfigId node); @Nonnull Set<EdgeId> edges(); @JsonProperty(PROP_NODES) @Nonnull Set<OspfNeighborConfigId> getNodes(); @Nonnull Optional<OspfSessionProperties> getSession(EdgeId id); @Nonnull Set<EdgeId> incomingEdges(OspfNeighborConfigId head); static EdgeId makeEdge(OspfNeighborConfigId tail, OspfNeighborConfigId head); @Override boolean equals(@Nullable Object o); @JsonIgnore ValueGraph<OspfNeighborConfigId, OspfSessionProperties> getGraph(); @Override int hashCode(); static final OspfTopology EMPTY; }