Skip to content

Instantly share code, notes, and snippets.

@mike-neck
Created December 13, 2017 20:36
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 mike-neck/f46cd0e203452c3a70235cac61f35881 to your computer and use it in GitHub Desktop.
Save mike-neck/f46cd0e203452c3a70235cac61f35881 to your computer and use it in GitHub Desktop.
http://teafortw0.hatenablog.com/entry/2017/12/13/220710 に対する疑問のためのコード
public abstract class BloodType {
public static BloodType A = new BloodType(0, "A") {};
public static BloodType B = new BloodType(1, "B") {};
public static BloodType O = new BloodType(2, "O") {};
public static BloodType AB = new BloodType(3, "AB") {};
private final int ordinal;
private final String name;
private BloodType(final int ordinal, final String name) {
this.ordinal = ordinal;
this.name = name;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment