se.unlogic.standardutils.enums
Class EnumUtils

java.lang.Object
  extended by se.unlogic.standardutils.enums.EnumUtils

public class EnumUtils
extends Object


Constructor Summary
EnumUtils()
           
 
Method Summary
static Enum<?> getInstanceFromField(Field field)
           
static Enum<?>[] getValuesFromField(Field field)
           
static
<Type extends Enum<Type>>
boolean
isEnum(Class<Type> e, String s)
           
static
<Type extends Enum<Type>>
Type
toEnum(Class<Type> e, String s)
           
static
<Type extends Enum<Type>>
ArrayList<Type>
toEnum(Class<Type> e, String[] values)
           
static
<Type extends Enum<Type>>
Type
toEnum(Type[] es, int ordinal)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumUtils

public EnumUtils()
Method Detail

isEnum

public static <Type extends Enum<Type>> boolean isEnum(Class<Type> e,
                                                       String s)

toEnum

public static <Type extends Enum<Type>> Type toEnum(Class<Type> e,
                                                    String s)

toEnum

public static <Type extends Enum<Type>> ArrayList<Type> toEnum(Class<Type> e,
                                                               String[] values)

toEnum

public static <Type extends Enum<Type>> Type toEnum(Type[] es,
                                                    int ordinal)

getInstanceFromField

public static Enum<?> getInstanceFromField(Field field)

getValuesFromField

public static Enum<?>[] getValuesFromField(Field field)


Copyright © 2011. All Rights Reserved.