public final class DefaultAnnotations extends Object implements SparseAnnotations
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
DefaultAnnotations.Builder
Facility for gradually building model annotations. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
static SparseAnnotations | 
EMPTY  | 
| Modifier and Type | Method and Description | 
|---|---|
HashMap<String,String> | 
asMap()
Returns the annotations as a map. 
 | 
static DefaultAnnotations.Builder | 
builder()
Creates a new annotations builder. 
 | 
boolean | 
equals(Object o)  | 
int | 
hashCode()  | 
boolean | 
isRemoved(String key)
Indicates whether the specified key has been tagged as removed. 
 | 
Set<String> | 
keys()
Returns the set of keys for available annotations. 
 | 
static DefaultAnnotations | 
merge(DefaultAnnotations annotations,
     SparseAnnotations sparseAnnotations)
Merges the specified base set of annotations and additional sparse
 annotations into new combined annotations. 
 | 
String | 
toString()  | 
static SparseAnnotations | 
union(SparseAnnotations annotations,
     SparseAnnotations sparseAnnotations)
Creates the union of two given SparseAnnotations. 
 | 
String | 
value(String key)
Returns the value of the specified annotation. 
 | 
public static final SparseAnnotations EMPTY
public HashMap<String,String> asMap()
public static DefaultAnnotations.Builder builder()
public static DefaultAnnotations merge(DefaultAnnotations annotations, SparseAnnotations sparseAnnotations)
annotations - base annotationssparseAnnotations - additional sparse annotationspublic static SparseAnnotations union(SparseAnnotations annotations, SparseAnnotations sparseAnnotations)
merge(DefaultAnnotations, SparseAnnotations) method,
 result will be SparseAnnotations instead of Annotations.
 A key tagged for removal will remain in the output SparseAnnotations,
 if the counterpart of the input does not contain the same key.annotations - base annotationssparseAnnotations - additional sparse annotationspublic Set<String> keys()
SparseAnnotationsNote that this set includes keys for any attributes tagged for removal.
keys in interface Annotationskeys in interface SparseAnnotationspublic String value(String key)
Annotationsvalue in interface Annotationskey - annotation keypublic boolean isRemoved(String key)
SparseAnnotationsisRemoved in interface SparseAnnotationskey - annotation key