Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010-2011. All Rights Reserved.