I need to check if all values in a map are equal. I have a method to perform this task but would like to use a library or native methods. Limitations: Java 5 + Apache Common
What about this something like this:
Set values = new HashSet(aMap.values()); boolean isUnique = values.size() == 1;