Annotation instances.
| Modifier and Type | Field and Description |
|---|---|
| private final TreeMap | annotations
|
| public static final Annotations | EMPTY
|
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | addAll(Annotations
non-null; the annotations to addAdds all of the elements of the given instance to this one. |
| public static Annotations | Returns: non-null; the combinationnon-null; an instancenon-null; the other instanceConstructs an immutable instance which is the combination of the two given instances. |
| public static Annotations | Returns: non-null; the combinationnon-null; the instance to augmentnon-null; the additional annotationConstructs an immutable instance which is the combination of the given instance with the given additional annotation. |
| public int | compareTo(Annotations
the object to be compared. other)Implements java. |
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. |
| public Collection | Returns: non-null; the set of annotationsGets the set of annotations contained in this instance. |
| public int | |
| public int | |
| public String |
| annotations | back to summary |
|---|---|
| private final TreeMap<CstType, Annotation> annotations
| |
| EMPTY | back to summary |
|---|---|
| public static final Annotations EMPTY
| |
| Annotations | back to summary |
|---|---|
| public Annotations() Constructs an empty instance. | |
| add | back to summary |
|---|---|
| public void add(Annotation annotation) Adds an element to this instance. There must not already be an element of the same type.
| |
| addAll | back to summary |
|---|---|
| public void addAll(Annotations toAdd) Adds all of the elements of the given instance to this one. The instances must not have any duplicate types.
| |
| combine | back to summary |
|---|---|
| public static Annotations combine(Annotations a1, Annotations a2) Constructs an immutable instance which is the combination of the two given instances. The two instances must contain disjoint sets of types.
| |
| combine | back to summary |
|---|---|
| public static Annotations combine(Annotations annotations, Annotation annotation) Constructs an immutable instance which is the combination of the given instance with the given additional annotation. The latter's type must not already appear in the former.
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(Annotations other) Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getAnnotations | back to summary |
|---|---|
| public Collection Gets the set of annotations contained in this instance. The result is always unmodifiable.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| size | back to summary |
|---|---|
| public int size() Gets the number of elements in this instance.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |