java. Switched to ArrayList and LinkedHashMap to allow null values.