Skip to content

Instantly share code, notes, and snippets.

@nosrednawall
Last active June 21, 2018 12:33
Show Gist options
  • Select an option

  • Save nosrednawall/990f8e39cdf839dc78e298723ae0e461 to your computer and use it in GitHub Desktop.

Select an option

Save nosrednawall/990f8e39cdf839dc78e298723ae0e461 to your computer and use it in GitHub Desktop.
Enum com string
MACACO_AND_GURILA("Macaco","Gurila"),
JACA_AND_ESCADA("Escada","Jaca");
private String tipoUm, tipoDois;
private TiposEnum(String tipoUm, String tipoDois) {
this.tipoUm = tipoUm;
this.tipoDois = tipoDois;
}
public String getTipoUm() {
return this.tipoUm;
}
public String getTipoDois() {
return this.tipoDois;
}
public TiposEnum[] geTiposMacacos() {
return TiposEnum.MACACO_AND_GURILA.values();
}
public TiposEnum[] geTiposCoisas() {
return TiposEnum.JACA_AND_ESCADA.values();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment