List of usage examples for java.net Inet4Address isMulticastAddress
public boolean isMulticastAddress()
From source file:io.netlibs.bgp.protocol.attributes.NextHopPathAttribute.java
/** * set the next hop. If the next hop is semantically invalid, an exception is raised. * //w w w. jav a 2 s. com * @param nextHop * the nextHop to set, MUST NOT be an IP multicast address * @throws IllegalArgumentException * next hop address is a multicast address. */ public void setNextHop(Inet4Address nextHop) { if (nextHop.isMulticastAddress()) throw new IllegalArgumentException(); this.nextHop = new InetAddressNextHop<Inet4Address>(nextHop); }