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)
InetNetwork
contains
in interface InetNetwork
ip
- hostname or ipAddressInetNetwork.contains(InetAddress)
public String toString()
toString
in class Object
Object.toString()
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.