lets pretend I have the following:
public class Something{
private final String VALUE_AAA = "ABC";
private final String VALUE_BBB = "DEF";
private final String VALUE_CCC = "GHI";
public String getValue(String param) {
}
}
Now I want if I pass the value BBB to getValue in return DEF
Is that possible? I don't want if - else statements. I tought about BeanUtils but I am not sure.
Thanks, Hauke
HashMap. The only language (that I know of) where you can do this in a (relatively) straightforward fashion is PHP.