Good day.
Do not tell me whether it is possible to create an enum so that each enumeration of the set corresponds to a constant (which can be called).
Something of the type (only with the ability to refer to a constant):
enum Entity{ TEXT{ public static final String REG_EXP_TEXT ="[a-wA-Wа-яА-я]"; }, NUMBER{ public static final String REG_EXP_TEXT ="(?:\\d*\\.)?\\d+"; } } I will be glad to any tips.