org.tfe.core
Class HotIP

java.lang.Object
  |
  +--org.tfe.core.HotIP
All Implemented Interfaces:
java.io.Serializable

public class HotIP
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
static HotIPList ipList
           
 
Constructor Summary
HotIP(java.net.InetAddress addr, short mask, java.awt.Color color, java.lang.String comments)
          Creates new HotIP
 
Method Summary
 boolean compare(java.lang.String ip)
          Compares an address with a Hot IP to see if it falls within an address/mask combination.
 java.net.InetAddress getAddress()
          Gets the IP address of the HotIP
 java.awt.Color getColor()
          Gets the Color of the HotIP
 java.lang.String getComments()
          Gets comments associated with the HotIP
 short getMask()
          Gets the bit mask value of the HotIP
 void setAddress(java.net.InetAddress address)
          Sets the IP address of the HotIP
 void setColor(java.awt.Color color)
          Sets the Color of the HotIP
 void setComments(java.lang.String comments)
          Sets the comments field of the HotIP
 void setMask(short mask)
          Sets the bit mask of the HotIP
 java.lang.String toString()
          Retrieves a String representation of the HotIP.
 java.lang.String[] toSummary()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ipList

public static final HotIPList ipList
Constructor Detail

HotIP

public HotIP(java.net.InetAddress addr,
             short mask,
             java.awt.Color color,
             java.lang.String comments)
Creates new HotIP

Method Detail

getAddress

public java.net.InetAddress getAddress()
Gets the IP address of the HotIP

Returns:
String value of the IP address

getMask

public short getMask()
Gets the bit mask value of the HotIP

Returns:
int value of the bit mask

getColor

public java.awt.Color getColor()
Gets the Color of the HotIP

Returns:
Color value of the HotIP

getComments

public java.lang.String getComments()
Gets comments associated with the HotIP

Returns:
String value of comments

setAddress

public void setAddress(java.net.InetAddress address)
Sets the IP address of the HotIP

Parameters:
address - String value of the IP address

setMask

public void setMask(short mask)
Sets the bit mask of the HotIP

Parameters:
mask - int value of the bit mask

setColor

public void setColor(java.awt.Color color)
Sets the Color of the HotIP

Parameters:
color - the color of the HotIP

setComments

public void setComments(java.lang.String comments)
Sets the comments field of the HotIP

Parameters:
comments - String value of the comments

toString

public java.lang.String toString()
Retrieves a String representation of the HotIP.

Overrides:
toString in class java.lang.Object
Returns:
the String representation of the HotIP.

compare

public boolean compare(java.lang.String ip)
Compares an address with a Hot IP to see if it falls within an address/mask combination.

Parameters:
ip - the IP address to be compared with the Hot IP.
Returns:
true if the IP is within the address/mask range, false if it is not

toSummary

public java.lang.String[] toSummary()