public class Inet4Network extends Object implements InetNetwork
| Constructor and Description |
|---|
Inet4Network(InetAddress ip,
InetAddress netmask)
You need a IP address and an subnetmask to construct an Inet4Network.
Both constructor parameters are passed via a InetAddress. |
public Inet4Network(InetAddress ip, InetAddress netmask)
ip - the InetAddress to init the classnetmask - the InetAddress represent the netmask to init the classpublic boolean contains(InetAddress ip)
InetNetworkcontains in interface InetNetworkip - hostname or ipAddressInetNetwork.contains(InetAddress)public String toString()
toString in class ObjectObject.toString()public int hashCode()
hashCode in class ObjectObject.hashCode()public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.