public class IPRange
extends java.lang.Object
IPRange
- An IP range of either IPv4 or IPv6 addresses.Modifier and Type | Method and Description |
---|---|
boolean |
contains(java.lang.String ipAddress)
Checks if passed IP address is contained in this range.
|
static IPRange |
parseRange(java.lang.String string)
Parses specified string to an IP range.
|
java.lang.String |
toString() |
public boolean contains(java.lang.String ipAddress)
ipAddress
- The IP address to checktrue
if contained; else false
public java.lang.String toString()
toString
in class java.lang.Object
public static IPRange parseRange(java.lang.String string)
string
- The string to parsenull
if passed string is empty