Você pode sobrecarregar o setTitle
mthod
public class Person{
public enum Title { MR, MRS, MS, CUSTOM };
private Title EnumTitle
private String CustomTitle;
public void setTitle(Title title); //Does what you'd expect
public void setTitle(String title)
{
EnumTitle = Title.CUSTOM;
CustomTitle = title;
}
/**
* This does present some problems when returning the value, however.
*
* My first thought to solve this problem is to always expect the
* output of getTitle() to be a string - either the custom title or
* a string representation of the enum value.
*/
}