|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.googlecode.ipv6.IPv6NetworkMask
public final class IPv6NetworkMask
Immutable representation of an IPv6 network mask. A network mask is nothing more than an IPv6 address with a continuous range of 1 bits starting from the most significant bit. A network mask can also be represented as a prefix length, which is the count of these 1 bits.
Method Summary | |
---|---|
IPv6Address |
asAddress()
|
int |
asPrefixLength()
|
boolean |
equals(Object o)
|
static IPv6NetworkMask |
fromAddress(IPv6Address iPv6Address)
Construct an IPv6 network mask from an IPv6 address. |
static IPv6NetworkMask |
fromPrefixLength(int prefixLength)
Construct an IPv6 network mask from a prefix length. |
int |
hashCode()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static IPv6NetworkMask fromAddress(IPv6Address iPv6Address)
iPv6Address
- address to use as network mask
IllegalArgumentException
- if the address is not a valid network maskpublic static IPv6NetworkMask fromPrefixLength(int prefixLength)
prefixLength
- prefix length
IllegalArgumentException
- if the prefix length is not in the interval ]0, 128]public int asPrefixLength()
public IPv6Address asAddress()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |