So currently I looking for some hints from more experienced programmers. I am in the point where, when looking into my code it seems not readable, what is probably big flaw. So lets go to the code itself:
In one the classes I have method:
protected void createModelsCharacterisitcListGroup(Map<CharacterType, Map<String, String>> characters) {
for (Entry<CharacterType, Map<String, String>> outterEntry : characters.entrySet()) {
for (Entry<String, String> innerEntry : outterEntry.getValue().entrySet()) {
outterEntry.getKey().create(characters.get(outterEntry.getKey()).get(innerEntry.getKey()), source.getStringified(innerEntry.getKey()));
}
}
}
And CharacterType
is the enum like this:
public enum CharacteristicType {
TYPE1 {
@Override
public void create(String name, String value){
}
},
TYPE2{
@Override
public void create(String name, String value) {
}
};
public abstract void create(String name, String value);
}
So what I want to do is:
Call method create
for given CharacterType
in Map
with Strings
from inner map
characters.get(outterEntry.getKey()).get(innerEntry.getKey())
is justinnerEntry.getValue()
?