D - the datatype of the attributepublic final class AttributeKey<D> extends MetadataKey<D>
equals(Object) to another attribute key if
their IDs are equal and the datatypes are the same.matches(MetadataKey) another attribute key if
the ID is a match for the ID of the other key, and the datatype is assignable
from the other key's datatype.| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(MetadataKey<?> other)
Compares first on ID, then on datatype.
|
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
matches(MetadataKey<?> other)
Returns
true if this key is a match for the given key. |
static AttributeKey<String> |
of(QName id)
Construct and return a new attribute key with the default datatype of
String.
|
static <T> AttributeKey<T> |
of(QName id,
Class<? extends T> datatype)
Construct and return a new attribute key with the given id and datatype.
|
String |
toString() |
getDatatype, getIdpublic static AttributeKey<String> of(QName id)
null.public static <T> AttributeKey<T> of(QName id, Class<? extends T> datatype)
null, or a
NullPointerException will be thrown.public boolean matches(MetadataKey<?> other)
true if this key is a match for the given key. This key
is a match for the other key if the other key is also an attribute key and
if its ID and datatype match.matches in class MetadataKey<D>public int compareTo(MetadataKey<?> other)
public String toString()
toString in class MetadataKey<D>Copyright © 2012. All Rights Reserved.