All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class benno.net.IPAddress

java.lang.Object
   |
   +----benno.net.IPAddress

public class IPAddress
extends Object
This class reprents an IP address (and netmask if desired) in a form more suitable for manipulation than java.net.InetAddress (or whatever it is called).


Constructor Index

 o IPAddress(String)
Takes an input of the form "192.168.201.16" and parses it.

Method Index

 o contains(IPAddress)
Returns true if this object, presumably representing a network rather than a single IP address, contains the candidate IPAddress.
 o equals(Object)
 o toString()

Constructors

 o IPAddress
 public IPAddress(String s)
Takes an input of the form "192.168.201.16" and parses it. Optionally, a suffix may be specified to set the netmask: for example "192.168.201.0/24"

Methods

 o toString
 public String toString()
Overrides:
toString in class Object
 o contains
 public boolean contains(IPAddress candidate)
Returns true if this object, presumably representing a network rather than a single IP address, contains the candidate IPAddress. i.e The candidate prefix length is equal or longer, and the prefix is the same.

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

All Packages  Class Hierarchy  This Package  Previous  Next  Index