public class Size
{
private Size(String name)
{ this.name = name;
}
private String name;
public static final Size SMALL =
new Size("SMALL");
public static final Size MEDIUM =
new Size("MEDIUM");
public static final Size LARGE =
new Size("LARGE");
}
Private constructor!
String field not necessary (but convenient for
toString, serialization)