net.sf.mpxj.utility
Class EnumUtility

java.lang.Object
  extended by net.sf.mpxj.utility.EnumUtility

public final class EnumUtility
extends Object

Utility method for working with enumerations.


Constructor Summary
EnumUtility()
           
 
Method Summary
static
<E extends Enum<E>>
E[]
createTypeArray(Class<E> c)
          Creates a lookup array based on the "value" associated wth an MpxjEnum.
static
<E extends Enum<E>>
E[]
createTypeArray(Class<E> c, int arraySizeOffset)
          Creates a lookup array based on the "value" associated wth an MpxjEnum.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumUtility

public EnumUtility()
Method Detail

createTypeArray

public static final <E extends Enum<E>> E[] createTypeArray(Class<E> c)
Creates a lookup array based on the "value" associated wth an MpxjEnum.

Type Parameters:
E - target enumeration
Parameters:
c - enumeration class
Returns:
lookup array

createTypeArray

public static final <E extends Enum<E>> E[] createTypeArray(Class<E> c,
                                                            int arraySizeOffset)
Creates a lookup array based on the "value" associated wth an MpxjEnum.

Type Parameters:
E - target enumeration
Parameters:
c - enumeration class
arraySizeOffset - offset to appy to the array size
Returns:
lookup array


Copyright © 2012. All Rights Reserved.