com.eurotech.framework.net
Class NetworkPair<T extends IPAddress>

java.lang.Object
  extended by com.eurotech.framework.net.NetworkPair<T>
Type Parameters:
T -

public class NetworkPair<T extends IPAddress>
extends Object

Model class for a 'network' that is specified by an IP and a mask. For example in the network represented by 192.168.1.0/24 the IpAddress would be 192.168.1.0 and the mask is 24 bits or 255.255.255.0. NetworkPairs are used in various components such as DHCP server configurations where a network must be specified to provide addresses on.

Author:
eurotech

Field Summary
 T m_ipAddress
          The IP Address portion of the NetworkPair
 short m_prefix
          The prefix portion of the NetworkPair
 
Constructor Summary
NetworkPair(T ipAddress, short prefix)
           
 
Method Summary
 boolean equals(Object o)
           
 T getIpAddress()
           
 short getPrefix()
           
 int hashCode()
           
 void setIpAddress(T ipAddress)
           
 void setPrefix(short prefix)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

m_ipAddress

public T extends IPAddress m_ipAddress
The IP Address portion of the NetworkPair


m_prefix

public short m_prefix
The prefix portion of the NetworkPair

Constructor Detail

NetworkPair

public NetworkPair(T ipAddress,
                   short prefix)
Method Detail

getIpAddress

public T getIpAddress()

setIpAddress

public void setIpAddress(T ipAddress)

getPrefix

public short getPrefix()

setPrefix

public void setPrefix(short prefix)

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2013. All Rights Reserved.