E
- the type of the elements maintained by this setpublic class AnnotatedTypeSet<E extends java.lang.reflect.AnnotatedType>
extends java.lang.Object
implements java.util.Set<E>
Set
implementation suited for maintaining AnnotatedType
elements.
The standard sets do not usually suffice as AnnotatedType
implements neither equals
nor hashCode
.
This implementation overcomes that limitation by transparently turning each AnnotatedType
into the canonical form using GenericTypeReflector.toCanonical(AnnotatedType)
.
By default, AnnotatedTypeSet
instances are backed by a HashSet
, but any set can be used instead.
The guarantees of AnnotatedTypeSet
are then the same as of the set it is backed by.AnnotatedTypeMap
Constructor and Description |
---|
AnnotatedTypeSet() |
AnnotatedTypeSet(java.util.Set<E> inner) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e) |
boolean |
addAll(java.util.Collection<? extends E> c) |
private java.util.Collection<?> |
canonical(java.util.Collection<?> c) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
boolean |
isEmpty() |
java.util.Iterator<E> |
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) |
private final java.util.Set<E extends java.lang.reflect.AnnotatedType> inner
public AnnotatedTypeSet()
public AnnotatedTypeSet(java.util.Set<E> inner)
public int size()
public boolean isEmpty()
public boolean contains(java.lang.Object o)
public java.util.Iterator<E> iterator()
public java.lang.Object[] toArray()
public <T> T[] toArray(T[] a)
public boolean add(E e)
public boolean remove(java.lang.Object o)
public boolean containsAll(java.util.Collection<?> c)
public boolean addAll(java.util.Collection<? extends E> c)
public boolean retainAll(java.util.Collection<?> c)
public boolean removeAll(java.util.Collection<?> c)
public void clear()
private java.util.Collection<?> canonical(java.util.Collection<?> c)