com.google.common.base
Class Enums
java.lang.Object
com.google.common.base.Enums
@GwtCompatible
@Beta
public final class Enums
- extends Object
Utility methods for working with Enum
instances.
- Since:
- 9.0
- Author:
- Steve McKay
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
valueOfFunction
public static <T extends Enum<T>> Function<String,T> valueOfFunction(Class<T> enumClass)
- Returns a
Function
that maps an Enum
name to the associated
Enum
constant. The Function
will return null
if the
Enum
constant does not exist.
- Parameters:
enumClass
- the Class
of the Enum
declaring the
constant values.
Copyright © 2010-2012. All Rights Reserved.