Here\'s my problem - I\'m looking for (if it even exists) the enum equivalent of ArrayList.contains();.
ArrayList.contains();
Here\'s a sample of my code problem:
<
You can use this
YourEnum {A1, A2, B1, B2}
boolean contains(String str){ return Sets.newHashSet(YourEnum.values()).contains(str); }
Update suggested by @wightwulf1944 is incorporated to make the solution more efficient.