org.jppf.utils
Class NetworkUtils.SubnetInformation

java.lang.Object
  extended by org.jppf.utils.Pair<InetAddress,Integer>
      extended by org.jppf.utils.NetworkUtils.SubnetInformation
All Implemented Interfaces:
Serializable
Enclosing class:
NetworkUtils

public static class NetworkUtils.SubnetInformation
extends Pair<InetAddress,Integer>

A pair grouping an InetAddress and the corresponding subnet mask length.

See Also:
Serialized Form

Constructor Summary
NetworkUtils.SubnetInformation(InetAddress addr, Integer subnetMaskLength)
          Initialze this pair with the specified InetAddress and subnet mask length.
 
Method Summary
 InetAddress address()
          Get the internet address.
 int rawIPAsInt()
          Convert an Inet4Address to a raw IP value.
 int subnetMask()
          Get the subnet mask for this subnet information.
 Integer subnetMaskLength()
          Get the subnet mask length.
 
Methods inherited from class org.jppf.utils.Pair
equals, first, hashCode, second
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkUtils.SubnetInformation

public NetworkUtils.SubnetInformation(InetAddress addr,
                                      Integer subnetMaskLength)
Initialze this pair with the specified InetAddress and subnet mask length.

Parameters:
addr - the address.
subnetMaskLength - the subnet mask length.
Method Detail

address

public InetAddress address()
Get the internet address.

Returns:
an InetAddress instance.

subnetMaskLength

public Integer subnetMaskLength()
Get the subnet mask length.

Returns:
the subnet mask length as an integer.

rawIPAsInt

public int rawIPAsInt()
Convert an Inet4Address to a raw IP value.

Returns:
the IP as a single int value.

subnetMask

public int subnetMask()
Get the subnet mask for this subnet information.

Returns:
the subnet amsk as an int value.


Copyright © 2005-2010 JPPF Team.