OBJECT - Type of object.ANNOTATION - Type of annotationspublic class AnnotatedObject<OBJECT,ANNOTATION> extends Object implements Annotated<OBJECT,ANNOTATION>
Annotated.| Modifier and Type | Field and Description |
|---|---|
Collection<ANNOTATION> |
annotations
The annotations
|
OBJECT |
object
The annotated object
|
| Constructor and Description |
|---|
AnnotatedObject(OBJECT object,
ANNOTATION annotation)
Construct with the given object and its annotation.
|
AnnotatedObject(OBJECT object,
Collection<ANNOTATION> annotations)
Construct with the given object and its annotations.
|
| Modifier and Type | Method and Description |
|---|---|
static <OBJECT,ANNOTATION> |
create(OBJECT object,
ANNOTATION annotation)
Create an
AnnotatedObject with the given object and its
annotation. |
static <OBJECT,ANNOTATION> |
create(OBJECT object,
Collection<ANNOTATION> annotations)
Create an
AnnotatedObject with the given object and its
annotations. |
static <OBJECT,ANNOTATION> |
createList(GroupedDataset<ANNOTATION,? extends ListDataset<OBJECT>,OBJECT> dataset)
Convert a grouped dataset to a list of annotated objects.
|
static <OBJECT,ANNOTATION> |
createList(OBJECT[] objs,
ANNOTATION[] anns)
Convert parallel arrays of objects and annotations to a list of
AnnotatedObject. |
static <OBJECT,ANNOTATION> |
createList(OBJECT[] objs,
ANNOTATION[][] anns)
Convert parallel arrays of objects and annotations to a list of
AnnotatedObject. |
Collection<ANNOTATION> |
getAnnotations() |
OBJECT |
getObject() |
public Collection<ANNOTATION> annotations
public AnnotatedObject(OBJECT object, Collection<ANNOTATION> annotations)
object - the objectannotations - the objects annotations.public AnnotatedObject(OBJECT object, ANNOTATION annotation)
object - the objectannotation - the object's annotation.public OBJECT getObject()
getObject in interface Annotated<OBJECT,ANNOTATION>public Collection<ANNOTATION> getAnnotations()
getAnnotations in interface Annotated<OBJECT,ANNOTATION>public static <OBJECT,ANNOTATION> AnnotatedObject<OBJECT,ANNOTATION> create(OBJECT object, Collection<ANNOTATION> annotations)
AnnotatedObject with the given object and its
annotations.OBJECT - Type of object.ANNOTATION - Type of annotationsobject - the objectannotations - the objects annotations.AnnotatedObjectpublic static <OBJECT,ANNOTATION> AnnotatedObject<OBJECT,ANNOTATION> create(OBJECT object, ANNOTATION annotation)
AnnotatedObject with the given object and its
annotation.OBJECT - Type of object.ANNOTATION - Type of annotationsobject - the objectannotation - the object's annotation.AnnotatedObjectpublic static <OBJECT,ANNOTATION> List<AnnotatedObject<OBJECT,ANNOTATION>> createList(GroupedDataset<ANNOTATION,? extends ListDataset<OBJECT>,OBJECT> dataset)
OBJECT - Type of object.ANNOTATION - Type of annotations.dataset - the datasetpublic static <OBJECT,ANNOTATION> List<AnnotatedObject<OBJECT,ANNOTATION>> createList(OBJECT[] objs, ANNOTATION[] anns)
AnnotatedObject.objs - the objectsanns - the annotation for each object (assumes 1 annotation per
object).public static <OBJECT,ANNOTATION> List<AnnotatedObject<OBJECT,ANNOTATION>> createList(OBJECT[] objs, ANNOTATION[][] anns)
AnnotatedObject.objs - the objectsanns - the annotations for each object.