mil.dod.th.ose.shared/src/mil/dod/th/ose/shared/SharedMessageUtils.java
public static <E extends Enum<?>> E convertEnumOrdinalToValue(final E[] values, final int ordinal)
    {
        for (E value : values)
        {
            if (value.ordinal() == ordinal)
            {
                return value;
            }
        }
        throw new IllegalArgumentException(String.format("Ordinal %d is invalid for type: %s", ordinal,
                values[0].getClass().getName()));
    }
/**
     * Convert an enum ordinal back to the ordinal value.
     * 
     * @param <E>
     *      type of the enum
     * @param values
     *      possible values of the enum
     * @param ordinal
     *      ordinal to convert
     * @return
     *      enum value with the given ordinal
     */
Convert an enum ordinal back to the ordinal value.

@param 
type of the enum
@param values
possible values of the enum
@param ordinal
ordinal to convert
@return
enum value with the given ordinal
Convert an enum ordinal back to the ordinal value . @param type of the enum @param values possible values of the enum @param ordinal ordinal to convert @return enum value with the given ordinal
public static <E extends Enum<?>> E convertEnumOrdinalToValue(final E[] values, final int ordinal)
    {
        for (E value : values)
        {
            if (value.ordinal() == ordinal)
            {
                return value;
            }
        }
        throw new IllegalArgumentException(String.format("Ordinal %d is invalid for type: %s", ordinal,
                values[0].getClass().getName()));
    }
public static < E extends Enum < ? > > E convertEnumOrdinalToValue ( final E [ ] values , final int ordinal ) { for ( E value : values ) { if ( value . ordinal ( ) == ordinal ) { return value ; } } throw new IllegalArgumentException ( String . format ( "Ordinal %d is invalid for type: %s" , ordinal , values [ 0 ] . getClass ( ) . getName ( ) ) ) ; }
Convert an enum ordinal back to the ordinal value.
Convert an enum ordinal back to the ordinal value .