@groovy.transform.Trait @groovy.transform.CompileStatic trait KeyClassQuery<V> extends java.lang.Object
Generic class to help searching maps that have a class as their key
V
- The type of value to returnType Params | Return Type | Name and description |
---|---|---|
|
V |
searchMap(java.util.Map<java.lang.Class, V> map, java.lang.Class clazz, boolean reverse) Searches for exact matches first. |
|
java.util.List |
searchMapAll(java.util.Map<java.lang.Class, V> map, java.lang.Class clazz) Searches for any class that is a super class of the class being searched. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Searches for exact matches first. If no exact match found, query the set of classes in reverse order and search for any class that is a super class of the class being searched. Return the first result found.
map
- The map to searchclazz
- The class to search forreverse
- Whether to search in reverse order (last in has priority)Searches for any class that is a super class of the class being searched. Return all results found.
map
- The map to searchclazz
- The class to search for