public class AnnotationMirrorSet extends Object implements Set<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(Collection<? extends AnnotationMirror> values) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(AnnotationMirror annotationMirror) |
boolean |
addAll(Collection<? extends AnnotationMirror> c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
isEmpty() |
Iterator<AnnotationMirror> |
iterator() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
public AnnotationMirrorSet()
public AnnotationMirrorSet(Collection<? extends AnnotationMirror> values)
public int size()
size
in interface Collection<AnnotationMirror>
size
in interface Set<AnnotationMirror>
public boolean isEmpty()
isEmpty
in interface Collection<AnnotationMirror>
isEmpty
in interface Set<AnnotationMirror>
public boolean contains(Object o)
contains
in interface Collection<AnnotationMirror>
contains
in interface Set<AnnotationMirror>
public Iterator<AnnotationMirror> iterator()
iterator
in interface Iterable<AnnotationMirror>
iterator
in interface Collection<AnnotationMirror>
iterator
in interface Set<AnnotationMirror>
public Object[] toArray()
toArray
in interface Collection<AnnotationMirror>
toArray
in interface Set<AnnotationMirror>
public <T> T[] toArray(T[] a)
toArray
in interface Collection<AnnotationMirror>
toArray
in interface Set<AnnotationMirror>
public boolean add(AnnotationMirror annotationMirror)
add
in interface Collection<AnnotationMirror>
add
in interface Set<AnnotationMirror>
public boolean remove(Object o)
remove
in interface Collection<AnnotationMirror>
remove
in interface Set<AnnotationMirror>
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<AnnotationMirror>
containsAll
in interface Set<AnnotationMirror>
public boolean addAll(Collection<? extends AnnotationMirror> c)
addAll
in interface Collection<AnnotationMirror>
addAll
in interface Set<AnnotationMirror>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<AnnotationMirror>
retainAll
in interface Set<AnnotationMirror>
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<AnnotationMirror>
removeAll
in interface Set<AnnotationMirror>
public void clear()
clear
in interface Collection<AnnotationMirror>
clear
in interface Set<AnnotationMirror>