|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.n52.security.common.ip.IPIntervalRange
public class IPIntervalRange
Represents a contiguous range of IP addresses defined by a lower and an upper boundary.
Constructor Summary | |
---|---|
IPIntervalRange(InetAddress singleAddress)
Creates an IP range based on a single IP address. |
|
IPIntervalRange(InetAddress lowerBoundary,
InetAddress upperBoundary)
Creates an IP range based on two IP addresses defining an interval, which contains the lower and upper boundaries. |
Method Summary | |
---|---|
boolean |
contains(InetAddress address)
Checks whether a given IP address is part of this IP address range. |
boolean |
equals(Object obj)
|
InetAddress |
first()
|
int |
hashCode()
|
InetAddress |
last()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IPIntervalRange(InetAddress lowerBoundary, InetAddress upperBoundary)
lowerBoundary
- IP address defining the lower boundary.upperBoundary
- IP address defining the upper boundary.public IPIntervalRange(InetAddress singleAddress)
singleAddress
- the single IP address that is contained in this range.Method Detail |
---|
public boolean contains(InetAddress address)
IPRange
contains
in interface IPRange
address
- the address to test.
true
if the specified address is in the range, false
otherwise.public InetAddress first()
first
in interface IPRange
public InetAddress last()
last
in interface IPRange
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |