public class AnnotationMirrorMap<V> extends Object implements Map<AnnotationMirror,V>
AnnotationUtils.areSame(javax.lang.model.element.AnnotationMirror, javax.lang.model.element.AnnotationMirror)
.
For example, the specification for the containsKey(Object key) method says: "returns true if
and only if this map contains a mapping for a key k such that (key == null ? k == null :
key.equals(k))." The specification for containsKey(java.lang.Object)
is "returns true
if and only if this map contains a mapping for a key k such that (key == null ? k == null :
AnnotationUtils.areSame(key, k))."
AnnotationMirror is an interface and not all implementing classes provide a correct equals method; therefore, existing implementations of Map cannot be used.
Constructor and Description |
---|
AnnotationMirrorMap()
Default constructor.
|
AnnotationMirrorMap(Map<AnnotationMirror,? extends V> copy)
Creates an annotation mirror map and adds all the mappings in
copy . |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<AnnotationMirror,V>> |
entrySet() |
V |
get(Object key) |
boolean |
isEmpty() |
Set<AnnotationMirror> |
keySet() |
V |
put(AnnotationMirror key,
V value) |
void |
putAll(Map<? extends AnnotationMirror,? extends V> m) |
V |
remove(Object key) |
int |
size() |
Collection<V> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
public AnnotationMirrorMap()
public AnnotationMirrorMap(Map<AnnotationMirror,? extends V> copy)
copy
.copy
- a map whose contents should be copied to the newly created mappublic int size()
size
in interface Map<AnnotationMirror,V>
public boolean isEmpty()
isEmpty
in interface Map<AnnotationMirror,V>
public boolean containsKey(Object key)
containsKey
in interface Map<AnnotationMirror,V>
public boolean containsValue(Object value)
containsValue
in interface Map<AnnotationMirror,V>
public V put(AnnotationMirror key, V value)
put
in interface Map<AnnotationMirror,V>
public void putAll(Map<? extends AnnotationMirror,? extends V> m)
putAll
in interface Map<AnnotationMirror,V>
public void clear()
clear
in interface Map<AnnotationMirror,V>
public Set<AnnotationMirror> keySet()
keySet
in interface Map<AnnotationMirror,V>
public Collection<V> values()
values
in interface Map<AnnotationMirror,V>
public Set<Map.Entry<AnnotationMirror,V>> entrySet()
entrySet
in interface Map<AnnotationMirror,V>