: Is there in Java an operator that allow to a variable only a fixed
: set of values. For example the variable char color have only these
: value: "red","yellow",.. "etc".
:
see
http://mindprod.com/jgloss/immutable.html read about Collections.unmodifiableList. Hope it helps.