Say I have an enum which is just
public enum Blah { A, B, C, D }
and I would like to find the enum value of a string, for example
If you don't want to write your own utility use Google's guava library:
Enums.getIfPresent(Blah.class, "A")
Unlike the built in java function it let's you check if A is present in Blah and doesn't throw an exception.