75a76 > * @author Robert Fischer 4360c4361,4364 < * contents (recursively) added to the new collection. --- > * contents (recursively) added to the new collection. > * > * Warning: This method used to extract values from map and flatten > * them. Maps are now left unadulterated. 4366c4370 < return new ArrayList(flatten(self, new LinkedList())); --- > return (List)flatten(self, new LinkedList()); 4371c4375,4378 < * contents (recursively) added to the new collection. --- > * contents (recursively) added to the new collection. > * > * Warning: This method used to extract values from map and flatten > * them. Maps are now left unadulterated. 4377c4384 < return new HashSet(flatten(self, new LinkedList())); --- > return (Set)flatten(self, new HashSet(self.size())); 4380c4387 < private static List flatten(Collection elements, List addTo) { --- > private static Collection flatten(final Collection elements, final Collection addTo) { 4386,4387d4392 < } else if (element instanceof Map) { < flatten(((Map) element).values(), addTo);