public interface Term extends Comparable<Term>, Serializable
Vocabulary| Modifier and Type | Method and Description |
|---|---|
<T> T |
as(Class<? extends T> type)
Transform the term to an instance of the specified type.
|
String |
entityName()
Get the simple name of the entity of the vocabulary identified by this
term constant.
|
Vocabulary |
getDeclaringVocabulary()
Returns the Vocabulary object corresponding to this term constant's
vocabulary type.
|
String |
name()
Returns the name of this term constant, exactly as declared in its
vocabulary declaration.
|
int |
ordinal()
Returns the ordinal of this term (its position in its vocabulary
declaration, where the initial constant is assigned an ordinal of zero).
|
String |
qualifiedEntityName()
Get the qualified name of the entity of the vocabulary identified by
this term constant.
|
compareToint ordinal()
String name()
Object.toString() method in preference
to this one, as the toString method may return a more user-friendly
name. This method is designed primarily for use in specialized
situations where correctness depends on getting the exact name, which
will not vary from release to release.String entityName()
String qualifiedEntityName()
Vocabulary getDeclaringVocabulary()
e1.getDeclaringVocabulary() == e2.getDeclaringVocabulary().<T> T as(Class<? extends T> type)
T - the type of object to be returnedtype - The type to which the term is to be transformed to.UnsupportedOperationException - if the term cannot be transformed to the specified type.
Copyright (C) 2014-2016, Center for Open Middleware