2
I have the following Enum:
public enum TipoPokemon {
FIRE("FIRE"),
WATER("WATER"),
GRASS("GRASS"),
ELECTRIC("ELECTRIC"),
ICE("ICE"),
DARK("DARK"),
GHOST("GHOST"),
FAIRY("FAIRY"),
PSYCHIC("PSYCHIC"),
DRAGON("DRAGON"),
POISON("POISON"),
GROUND("GROUND"),
ROCK("ROCK"),
NORMAL("NORMAL"),
BUG("BUG"),
FIGHTING("FIGHTING"),
STEEL("STEEL"),
FLYING("FLYING");
private String nome;
private TipoPokemon(String nome) {
this.nome = nome;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
}
I need to go through each of these values in another class to make a comparison of values. How can I go through each Enum value and compare with a string x ?
@Renan I will have an x method that will receive a text as parameter... Inside this text I will check if any of the values of Enum is between the text, understood ?
– Roknauta