Skip to content

Instantly share code, notes, and snippets.

@OyaCanli
Created June 21, 2019 11:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OyaCanli/4516e822df6b3449775f9d0810a25d20 to your computer and use it in GitHub Desktop.
Save OyaCanli/4516e822df6b3449775f9d0810a25d20 to your computer and use it in GitHub Desktop.
@InverseMethod("positionToGender")
public static int genderToPosition(Gender gender){
return gender == null ? 0 : gender.ordinal();
}
public static Gender positionToGender(int position){
return Gender.values()[position];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment