|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.gdata.model.MetadataKey<D>
com.google.gdata.model.AttributeKey<D>
D - the datatype of the attributepublic final class AttributeKey<D>
A key referring to a particular attribute. Holds the ID of the attribute and the expected datatype. Attribute keys support value-based equality, natural ordering, and matching.
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.
| Method Summary | ||
|---|---|---|
int |
compareTo(MetadataKey<?> other)
Compares first on ID, then on datatype. |
|
boolean |
equals(java.lang.Object obj)
|
|
int |
hashCode()
|
|
boolean |
matches(MetadataKey<?> other)
Returns true if this key is a match for the given key. |
|
static AttributeKey<java.lang.String> |
of(QName id)
Construct and return a new attribute key with the default datatype of String. |
|
static
|
of(QName id,
java.lang.Class<? extends T> datatype)
Construct and return a new attribute key with the given id and datatype. |
|
java.lang.String |
toString()
|
|
| Methods inherited from class com.google.gdata.model.MetadataKey |
|---|
getDatatype, getId |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static AttributeKey<java.lang.String> of(QName id)
null.
public static <T> AttributeKey<T> of(QName id,
java.lang.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 int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class MetadataKey<D>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||