public class AnnotationMirrorSet
extends java.lang.Object
implements java.util.Set<javax.lang.model.element.AnnotationMirror>
AnnotationUtils.areSame(javax.lang.model.element.AnnotationMirror, javax.lang.model.element.AnnotationMirror)
rather than equals.
For example, the specification for the contains(Object o) method says: "returns true if and
only if this collection contains at least one element e such that (o == null ? e == null : o
.equals(e))." The specification for contains(java.lang.Object)
is "returns true if and
only if this collection contains at least one element e such that (o == null ? e == null :
AnnotationUtils.areSame(o, e))".
AnnotationMirror is an interface and not all implementing classes provide a correct equals method; therefore, the existing implementations of Set cannot be used.
Constructor and Description |
---|
AnnotationMirrorSet() |
AnnotationMirrorSet(java.util.Collection<? extends javax.lang.model.element.AnnotationMirror> values) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(javax.lang.model.element.AnnotationMirror annotationMirror) |
boolean |
addAll(java.util.Collection<? extends javax.lang.model.element.AnnotationMirror> c) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
boolean |
isEmpty() |
java.util.Iterator<javax.lang.model.element.AnnotationMirror> |
iterator() |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
int |
size() |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
public AnnotationMirrorSet()
public AnnotationMirrorSet(java.util.Collection<? extends javax.lang.model.element.AnnotationMirror> values)
public int size()
size
in interface java.util.Collection<javax.lang.model.element.AnnotationMirror>
size
in interface java.util.Set<javax.lang.model.element.AnnotationMirror>
public boolean isEmpty()
isEmpty
in interface java.util.Collection<javax.lang.model.element.AnnotationMirror>
isEmpty
in interface java.util.Set<javax.lang.model.element.AnnotationMirror>
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection<javax.lang.model.element.AnnotationMirror>
contains
in interface java.util.Set<javax.lang.model.element.AnnotationMirror>
public java.util.Iterator<javax.lang.model.element.AnnotationMirror> iterator()
iterator
in interface java.lang.Iterable<javax.lang.model.element.AnnotationMirror>
iterator
in interface java.util.Collection<javax.lang.model.element.AnnotationMirror>
iterator
in interface java.util.Set<javax.lang.model.element.AnnotationMirror>
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<javax.lang.model.element.AnnotationMirror>
toArray
in interface java.util.Set<javax.lang.model.element.AnnotationMirror>
public <T> T[] toArray(T[] a)
toArray
in interface java.util.Collection<javax.lang.model.element.AnnotationMirror>
toArray
in interface java.util.Set<javax.lang.model.element.AnnotationMirror>
public boolean add(javax.lang.model.element.AnnotationMirror annotationMirror)
add
in interface java.util.Collection<javax.lang.model.element.AnnotationMirror>
add
in interface java.util.Set<javax.lang.model.element.AnnotationMirror>
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection<javax.lang.model.element.AnnotationMirror>
remove
in interface java.util.Set<javax.lang.model.element.AnnotationMirror>
public boolean containsAll(java.util.Collection<?> c)
containsAll
in interface java.util.Collection<javax.lang.model.element.AnnotationMirror>
containsAll
in interface java.util.Set<javax.lang.model.element.AnnotationMirror>
public boolean addAll(java.util.Collection<? extends javax.lang.model.element.AnnotationMirror> c)
addAll
in interface java.util.Collection<javax.lang.model.element.AnnotationMirror>
addAll
in interface java.util.Set<javax.lang.model.element.AnnotationMirror>
public boolean retainAll(java.util.Collection<?> c)
retainAll
in interface java.util.Collection<javax.lang.model.element.AnnotationMirror>
retainAll
in interface java.util.Set<javax.lang.model.element.AnnotationMirror>
public boolean removeAll(java.util.Collection<?> c)
removeAll
in interface java.util.Collection<javax.lang.model.element.AnnotationMirror>
removeAll
in interface java.util.Set<javax.lang.model.element.AnnotationMirror>
public void clear()
clear
in interface java.util.Collection<javax.lang.model.element.AnnotationMirror>
clear
in interface java.util.Set<javax.lang.model.element.AnnotationMirror>