public static final String[] VALUES = newString[]{"AB","BC","CD","AE"};
Arrays.asList(VALUES).contains("BC");
Referer: http://stackoverflow.com/questions/1128723/in-java-how-can-i-test-if-an-array-contains-a-certain-value