Is it possible to have a HashMap return a default value for all keys that are not found in the set?
HashMap
In Java 8, use Map.getOrDefault. It takes the key, and the value to return if no matching key is found.