if (isProductDeliverable) {
REQUIRED_FIELDS = Arrays.asList(new String[] { Fields.NAME, Fields.EMAIL, Fields.ADDRESS });
} else {
REQUIRED_FIELDS = Arrays.asList(new String[] { Fields.NAME, Fields.EMAIL });
}
Instead of this, I want to have a predefined enum with two fields - REQUIRED_FIELDS_FOR_DELIVERABLE_PRODUCTS and REQUIRED_FIELDS_FOR_DOWNLOADABLE_PRODUCTS
I know the theory of enums but I've never used them so I cant figure out a way how to do this.
Or maybe a way to ask for the required fields by passing this "isProductDeliverable" boolean and get the correct array of fields?