mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-14 14:05:17 +00:00
LANG-1352: EnumUtils.getEnumIgnoreCase and isValidEnumIgnoreCase methods added
add since javadoc tags and changes.xml entry
This commit is contained in:
parent
0b70b01a9f
commit
63f11e9dc1
@ -50,6 +50,7 @@ The <action> type attribute can be add,update,fix,remove.
|
||||
<action issue="LANG-1371" type="fix" dev="pschumacher" due-to="Dmitry Ovchinnikov">Fix TypeUtils#parameterize to work correctly with narrower-typed array</action>
|
||||
<action issue="LANG-1370" type="fix" dev="kinow" due-to="Andre Dieb">Fix EventCountCircuitBreaker increment batch</action>
|
||||
<action issue="LANG-1367" type="update" dev="ggregory" due-to="Gary Gregory">ObjectUtils.identityToString(Object) and friends should allocate builders and buffers with a size</action>
|
||||
<action issue="LANG-1352" type="add" dev="pschumacher" due-to="Ruslan Sibgatullin">EnumUtils.getEnumIgnoreCase and isValidEnumIgnoreCase methods added</action>
|
||||
</release>
|
||||
|
||||
<release version="3.7" date="2017-11-04" description="New features and bug fixes. Requires Java 7, supports Java 8, 9, 10.">
|
||||
|
@ -101,6 +101,7 @@ public static <E extends Enum<E>> boolean isValidEnum(final Class<E> enumClass,
|
||||
* @param enumClass the class of the enum to query, not null
|
||||
* @param enumName the enum name, null returns false
|
||||
* @return true if the enum name is valid, otherwise false
|
||||
* @since 3.8
|
||||
*/
|
||||
public static <E extends Enum<E>> boolean isValidEnumIgnoreCase(final Class<E> enumClass, final String enumName) {
|
||||
return getEnumIgnoreCase(enumClass, enumName) != null;
|
||||
@ -138,6 +139,7 @@ public static <E extends Enum<E>> E getEnum(final Class<E> enumClass, final Stri
|
||||
* @param enumClass the class of the enum to query, not null
|
||||
* @param enumName the enum name, null returns null
|
||||
* @return the enum, null if not found
|
||||
* @since 3.8
|
||||
*/
|
||||
public static <E extends Enum<E>> E getEnumIgnoreCase(final Class<E> enumClass, final String enumName) {
|
||||
if (enumName == null || !enumClass.isEnum()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user