org.apache.james.util.inetnetwork.model
Class Inet4Network

java.lang.Object
  extended by org.apache.james.util.inetnetwork.model.Inet4Network
All Implemented Interfaces:
InetNetwork

public class Inet4Network
extends java.lang.Object
implements InetNetwork


Constructor Summary
Inet4Network(java.net.InetAddress ip, java.net.InetAddress netmask)
          You need a IP address and an subnetmask to construct an Inet4Network.
 
Method Summary
 boolean contains(java.net.InetAddress ip)
          Return true if the network contains the given name
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Inet4Network

public Inet4Network(java.net.InetAddress ip,
                    java.net.InetAddress netmask)
You need a IP address and an subnetmask to construct an Inet4Network.
Both constructor parameters are passed via a InetAddress.

Parameters:
ip - the InetAddress to init the class
netmask - the InetAddress represent the netmask to init the class
Method Detail

contains

public boolean contains(java.net.InetAddress ip)
Description copied from interface: InetNetwork
Return true if the network contains the given name

Specified by:
contains in interface InetNetwork
Returns:
true if the network contains the ip address

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2002-2010 The Apache Software Foundation. All Rights Reserved.