This isn't the right way to expose this information. Make the maps private and then expose a public getter. Look into Collections.unmodifiableMap if you don't want code to be able to modify the map directly. You may need to extend HashMap though...