public class TermsAnnotation extends Object implements IAnnotation
| Constructor and Description |
|---|
TermsAnnotation()
Creates a new empty TermsAnnotation object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(String term,
String info)
Adds a term to the annotation.
|
String |
getInfo(int index)
Gets the term information for a given index,
or an empty string if there is not associated information for the term.
|
String |
getTerm(int index)
Gets the term for a given index.
|
int |
size()
Gets the number of terms in this annotation.
|
String |
toString()
Gets a human readable representation of this annotation.
|
public TermsAnnotation()
public void add(String term, String info)
term - the term to add.info - the associated into (can be null).public int size()
public String getTerm(int index)
index - the index of the term to retrieve.public String getInfo(int index)
index - the index of the term information to retrieve.public String toString()
IAnnotationtoString in interface IAnnotationtoString in class ObjectCopyright © 2021. All rights reserved.