According to a business requirement, I will need not check if the value of an attribute if it equal to a list of given string values. I am wondering what is the better way to do it, in case if someday there is a new value that needs to be added. Should these values be stored in a table?
List<String> values = new ArrayList<>();
values.add("value1");
values.add("value2");
values.add("value3");
if(values.contains(brand){
// if the brand contains the given values
// implement a specific logic
}
Thank you