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 TypeMethodDescriptionvoidclear()booleancontainsKey(Object key)booleancontainsValue(Object value)entrySet()booleanisEmpty()keySet()voidintsize()values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
containsKeyin interfaceMap<N extends Node,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<N extends Node,V>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-