Use the Apache commons lang3 lib instead
EnumUtils.isValidEnum(MyEnum.class, myValue)
More Related Contents:
- Using Enum values as String literals
- Can I get an enum based on the value of its field?
- Regex for converting xml tags key to camel case
- Remove duplicate phrases [closed]
- How to split a string with any whitespace chars as delimiters
- What is meant by immutable?
- What is the purpose of the expression “new String(…)” in Java?
- How does the String class override the + operator?
- How to format strings in Java
- How to find nth occurrence of character in a string?
- Using Java to find substring of a bigger string using Regular Expression
- How to use java.String.format in Scala?
- Remove trailing zero in Java
- How do I split a string in Java?
- How can I remove a substring from a given String?
- Trim characters in Java
- Java split string to array [duplicate]
- In Java, for a string x, what is the runtime cost of s.length()? Is it O(1) or O(n)?
- Preferred Idiom for Joining a Collection of Strings in Java
- Java String.replace/replaceAll not working
- Find the Number of Occurrences of a Substring in a String
- Integer.toString(int i) vs String.valueOf(int i) in Java
- Query String Manipulation in Java
- Java String variable setting – reference or value?
- How to check whether a string contains at least one alphabet in java?
- How is concatenation of final strings done in Java?
- Replace Last Occurrence of a character in a string [duplicate]
- What is a Java String’s default initial value?
- How to convert a Java String to an ASCII byte array?
- Behavior of String literals is confusing