|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.aselect.agent.authorization.parsing.types.IPv4Address
public class IPv4Address
IP Version 4 Address.
Description:
A simple Java object to compare IPv4 adresses.
Concurrency issues:
-
Field Summary | |
---|---|
static java.lang.String |
IPV4_REGEX
Regex for IP v4 address. |
Constructor Summary | |
---|---|
IPv4Address(java.lang.String s)
Create new IPv4Address . |
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 IPV4_REGEX
Constructor Detail |
---|
public IPv4Address(java.lang.String s) throws java.lang.Exception
IPv4Address
.
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 IPv4Address
.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 |