@Test public void testAddNeighbor() throws Exception { helloPacket.addNeighbor(Ip4Address.valueOf("10.226.165.170")); result1 = helloPacket.containsNeighbour(Ip4Address.valueOf("10.226.165.170")); assertThat(result1, is(true)); }
public void addNeighbor(Ip4Address neighborID) { if (!neighborAddress.contains(neighborID)) { neighborAddress.add(neighborID); } }
HelloPacket extends OspfPacketHeader { public void addNeighbor(Ip4Address neighborID) { if (!neighborAddress.contains(neighborID)) { neighborAddress.add(neighborID); } } }
HelloPacket extends OspfPacketHeader { public void addNeighbor(Ip4Address neighborID) { if (!neighborAddress.contains(neighborID)) { neighborAddress.add(neighborID); } } HelloPacket();  HelloPacket(OspfPacketHeader ospfHeader); }
HelloPacket extends OspfPacketHeader { public void addNeighbor(Ip4Address neighborID) { if (!neighborAddress.contains(neighborID)) { neighborAddress.add(neighborID); } } HelloPacket();  HelloPacket(OspfPacketHeader ospfHeader); Ip4Address networkMask(); void setNetworkMask(Ip4Address networkMask); Ip4Address bdr(); void setBdr(Ip4Address bdr); Ip4Address dr(); void setDr(Ip4Address dr); void addNeighbor(Ip4Address neighborID); boolean containsNeighbour(Ip4Address neighborID); int options(); void setOptions(int options); int routerPriority(); void setRouterPriority(int routerPriority); int helloInterval(); void setHelloInterval(int helloInterval); int routerDeadInterval(); void setRouterDeadInterval(int routerDeadInterval); @Override OspfPacketType ospfMessageType(); @Override void readFrom(ChannelBuffer channelBuffer); @Override byte[] asBytes(); byte[] getHelloHeaderAsByteArray(); byte[] getHelloBodyAsByteArray(); @Override String toString(); }
HelloPacket extends OspfPacketHeader { public void addNeighbor(Ip4Address neighborID) { if (!neighborAddress.contains(neighborID)) { neighborAddress.add(neighborID); } } HelloPacket();  HelloPacket(OspfPacketHeader ospfHeader); Ip4Address networkMask(); void setNetworkMask(Ip4Address networkMask); Ip4Address bdr(); void setBdr(Ip4Address bdr); Ip4Address dr(); void setDr(Ip4Address dr); void addNeighbor(Ip4Address neighborID); boolean containsNeighbour(Ip4Address neighborID); int options(); void setOptions(int options); int routerPriority(); void setRouterPriority(int routerPriority); int helloInterval(); void setHelloInterval(int helloInterval); int routerDeadInterval(); void setRouterDeadInterval(int routerDeadInterval); @Override OspfPacketType ospfMessageType(); @Override void readFrom(ChannelBuffer channelBuffer); @Override byte[] asBytes(); byte[] getHelloHeaderAsByteArray(); byte[] getHelloBodyAsByteArray(); @Override String toString();  }