What is the best way to restrict the values of a field to certain values? In this case it is a
string field, and the values to restrict to are a set of 4 different strings.
It has to be done in the class itself. I'm wondering how to do this. I know it might be that you create an if statement in the constructor and check for the values, but I'm not sure how you then tell the constructor to cease constructing or delete the object it has constructed.
Or maybe there is another way entirely to restrict the values.