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:
<
If you are Using Java 8 or above, you can do this :
boolean isPresent(String testString){ return Stream.of(Choices.values()).map(Enum::name).collect(Collectors.toSet()).contains(testString); }