Skip to content

Instantly share code, notes, and snippets.

@galcyurio
Created December 1, 2016 07:39
Show Gist options
  • Save galcyurio/9c743fe61d120419f1aa3fdfc9960795 to your computer and use it in GitHub Desktop.
Save galcyurio/9c743fe61d120419f1aa3fdfc9960795 to your computer and use it in GitHub Desktop.
private enum Category {
POP, PTY, REH, SKY, T3H, UUU, VEC, VVV, WSD, R06, S06;
}
Category enumCategory = Category.valueOf(category);
switch (enumCategory) {
case POP:
forecast.setPopValue(fcstValue);
break;
case PTY:
forecast.setPtyValue(fcstValue);
break;
case REH:
forecast.setRehValue(fcstValue);
break;
case SKY:
forecast.setSkyValue(fcstValue);
break;
case T3H:
forecast.setT3hValue(fcstValue);
break;
case UUU:
forecast.setUuuValue(fcstValue);
break;
case VEC:
forecast.setVecValue(fcstValue);
break;
case VVV:
forecast.setVvvValue(fcstValue);
break;
case WSD:
forecast.setWsdValue(fcstValue);
break;
case R06:
forecast.setR06Value(fcstValue);
break;
case S06:
forecast.setS06Value(fcstValue);
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment