Package com.github.javaparser.utils
Class VisitorMap<N extends Node,V>
java.lang.Object
com.github.javaparser.utils.VisitorMap<N,V>
- All Implemented Interfaces:
Map<N,V>
A map that overrides the equals and hashcode calculation of the added nodes
by using another equals and hashcode visitor for those methods.
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionVisitorMap(GenericVisitor<Integer,Void> hashcodeVisitor, GenericVisitor<Boolean,Visitable> equalsVisitor)
Pass the visitors to use for equals and hashcode. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsKey(Object key)
boolean
containsValue(Object value)
entrySet()
boolean
isEmpty()
keySet()
void
int
size()
values()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
VisitorMap
public VisitorMap(GenericVisitor<Integer,Void> hashcodeVisitor, GenericVisitor<Boolean,Visitable> equalsVisitor)Pass the visitors to use for equals and hashcode.
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKey
in interfaceMap<N extends Node,V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<N extends Node,V>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-