public final class Ip6AddressToken extends Object implements ScalarToken, Comparable<Ip6AddressToken>
Ip6AddressValued object.| Modifier and Type | Field and Description |
|---|---|
static Ip6AddressToken |
NULL
A null valued
Ip6AddressToken |
static Ip6AddressToken |
ZERO
A zero valued
Ip6AddressToken |
static byte[] |
ZERO_VALUE
The byte array representing the 0:0:0:0:0:0:0:0 ip address, the empty
byte[16]. |
| Constructor and Description |
|---|
Ip6AddressToken(byte[] value)
Constructs a new token with the given
non-null ip6 value.
|
Ip6AddressToken(Ip6AddressValued value)
Constructs a new token with the ip6 address
value in the given container.
|
Ip6AddressToken(String value)
Constructs a
Ip6AddressToken with the non-null
ip6 address value encoded by the given string. |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
asAddress()
Gets the contained raw IP6 address value.
|
Inet6Address |
asInet6Address()
Gets the contained IP address as an Inet6Address.
|
int |
compareTo(Ip6AddressToken that) |
boolean |
equals(Object obj)
Indicates whether another object is equal to this token.
|
ScalarTokenType |
getType()
Gets the data type of the token.
|
int |
hashCode()
Returns a hash code for the token.
|
boolean |
isNull()
Indicates whether the token is null valued.
|
boolean |
isZero()
Indicates whether the value is the zero value
for the type.
|
static Ip6AddressToken |
parse(String value)
Converts a string representation of a ip6 address value into
a token.
|
boolean |
represents(byte[] otherData)
A 'deep equals' comparison of this token's contents to the provided raw ip6 bytes.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetType, isZeroisNullpublic static final Ip6AddressToken NULL
Ip6AddressTokenpublic static final byte[] ZERO_VALUE
byte[16].public static final Ip6AddressToken ZERO
Ip6AddressTokenpublic Ip6AddressToken(Ip6AddressValued value)
value - a Ip6AddressValued containing the
desired valuepublic Ip6AddressToken(byte[] value)
NULL.value - the ip6 address value of the token.
A copy of the array will be made.NullPointerException - if the supplied array
is nullpublic Ip6AddressToken(String value)
Ip6AddressToken with the non-null
ip6 address value encoded by the given string.
Should be in form 0:0:0:0:0:0:0:0
If a null valued token is desired, use NULL.value - a string representing the ip6 valueNullPointerException - if the supplied hexadecimal
string is nullpublic int compareTo(Ip6AddressToken that)
compareTo in interface Comparable<Ip6AddressToken>public boolean equals(Object obj)
DataTokenTokenComparator.equal(TokenValued,TokenValued)
but makes it possible to store DataTokens in Maps.public boolean represents(byte[] otherData)
otherData - the object that we're comparing topublic int hashCode()
DataTokenTokenConverter.asHashCode(TokenValued).public static Ip6AddressToken parse(String value)
value - a string representing an ip6 addresspublic final ScalarTokenType getType()
TokenValuedgetType in interface ScalarValuedgetType in interface TokenValuedgetType in interface ScalarTypedgetType in interface TokenTypedpublic final byte[] asAddress()
Ip6AddressValuedasAddress in interface Ip6AddressValuedbyte[16]. If null valued,
as indicated by TokenValued.isNull(), null
is returned.public final Inet6Address asInet6Address()
Ip6AddressValuedasInet6Address in interface Ip6AddressValuedInet6Address. If null valued,
as indicated by TokenValued.isNull(), null
is returned.public final boolean isZero()
ScalarValuedisZero in interface ScalarValuedtrue if the value is the zero value,
false otherwise.public final boolean isNull()
TokenValuedisNull in interface TokenValuedtrue if the token is null valued,
false otherwiseCopyright © 2019 Actian Corporation. All rights reserved.