|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.aselect.agent.authorization.parsing.types.IPv6Address
public class IPv6Address
IP Version 6 Address.
Description:
A simple Java object to compare IPv6 adresses.
Only default IPv6 adresses with subnet mask are supported:
x:x:x:x:x:x:x:x(/x:x:x:x:x:x:x:x or /x)
, where the 'x's are the
hexadecimal values of the eight 16-bit pieces of the address.
Examples:
FEDC:BA98:7654:3210:FEDC:BA98:7654:3210
1080:0:0:0:8:800:200C:417A/FFFF:0:0:0:0:0:0:0
1080:0:0:0:8:800:200C:417A/32
Field Summary | |
---|---|
static java.lang.String |
IPV6_REGEX
Regex for IP v6 address. |
Constructor Summary | |
---|---|
IPv6Address(java.lang.String s)
Create new IPv6Address . |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object oOther)
Compare two ip adresses (Only equals is supported). |
java.lang.String |
toString()
Retrieve a String representation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String IPV6_REGEX
Constructor Detail |
---|
public IPv6Address(java.lang.String s) throws java.lang.Exception
IPv6Address
.
s
- The String respresentation of the address.
java.lang.Exception
- If parsing fails.Method Detail |
---|
public int compareTo(java.lang.Object oOther) throws java.lang.ClassCastException
compareTo
in interface java.lang.Comparable
oOther
- The object to compare with.
0
if the ip adresses are equal with
network mask taken in account, otherwise -1.
java.lang.ClassCastException
- If the provided Object
is not an IPv6Address
.public java.lang.String toString()
String
representation.
toString
in class java.lang.Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |