mil.dod.th.ose.shared/src/mil/dod/th/ose/shared/SharedMessageUtils.java
@SuppressWarnings("unchecked") //NOCHECKSTYLE -> Complexity 14; Max is 12. Need all switch cases to supply supported types
    public static Object convertMultitypeToObject(final Multitype value) 
    {
        switch (value.getType()) 
        {
            case NONE:
                return null;
                
            case INT32:
                return value.getInt32Value();
                
            case INT64:
                return value.getInt64Value();
                
            case STRING:
                return value.getStringValue();
                
            case BOOL:
                return value.getBoolValue();
                
            case FLOAT:
                return value.getFloatValue();
                
            case DOUBLE:
                return value.getDoubleValue();
                
            case SHORT:
                return ((Integer)value.getShortValue()).shortValue();
               
            case CHARACTER:
                return value.getCharValue().charAt(0);
                
            case BYTE:
                return ((Integer)value.getByteValue()).byteValue();
                
            case BYTES:
                return value.getByteStringValue();
                
            case UUID:
                return new UUID(value.getUuidMostSigBitsValue(), value.getUuidLeastSigBitsValue());

            case MULTITYPE_LIST:
                @SuppressWarnings("rawtypes")
                final List list = new ArrayList();
                for (Multitype multi : value.getListList())
                {
                    list.add(convertMultitypeToObject(multi));
                }
                return list;
                
            default:
                throw new IllegalArgumentException(
                        String.format("Multitype value contains an unknown type: %s", value.getType()));
        }
    }
/**
     * Convert a {@link Multitype} object to an object that can be used within the Java environment.
     * 
     * @param value
     *      object to convert
     * @return
     *      converted object, type is based on the type dictated by the multitype value
     */
Convert a  Multitype object to an object that can be used within the Java environment.

@param value
object to convert
@return
converted object, type is based on the type dictated by the multitype value
Convert a Multitype object to an object that can be used within the Java environment . @param value object to convert @return converted object type is based on the type dictated by the multitype value
@SuppressWarnings("unchecked") 
    public static Object convertMultitypeToObject(final Multitype value) 
    {
        switch (value.getType()) 
        {
            case NONE:
                return null;
            case INT32:
                return value.getInt32Value();
            case INT64:
                return value.getInt64Value();
            case STRING:
                return value.getStringValue();
            case BOOL:
                return value.getBoolValue();
            case FLOAT:
                return value.getFloatValue();
            case DOUBLE:
                return value.getDoubleValue();
            case SHORT:
                return ((Integer)value.getShortValue()).shortValue();
            case CHARACTER:
                return value.getCharValue().charAt(0);
            case BYTE:
                return ((Integer)value.getByteValue()).byteValue();
            case BYTES:
                return value.getByteStringValue();
            case UUID:
                return new UUID(value.getUuidMostSigBitsValue(), value.getUuidLeastSigBitsValue());
            case MULTITYPE_LIST:
                @SuppressWarnings("rawtypes")
                final List list = new ArrayList();
                for (Multitype multi : value.getListList())
                {
                    list.add(convertMultitypeToObject(multi));
                }
                return list;
            default:
                throw new IllegalArgumentException(
                        String.format("Multitype value contains an unknown type: %s", value.getType()));
        }
    }
@ SuppressWarnings ( "unchecked" ) public static Object convertMultitypeToObject ( final Multitype value ) { switch ( value . getType ( ) ) { case NONE : return null ; case INT32 : return value . getInt32Value ( ) ; case INT64 : return value . getInt64Value ( ) ; case STRING : return value . getStringValue ( ) ; case BOOL : return value . getBoolValue ( ) ; case FLOAT : return value . getFloatValue ( ) ; case DOUBLE : return value . getDoubleValue ( ) ; case SHORT : return ( ( Integer ) value . getShortValue ( ) ) . shortValue ( ) ; case CHARACTER : return value . getCharValue ( ) . charAt ( 0 ) ; case BYTE : return ( ( Integer ) value . getByteValue ( ) ) . byteValue ( ) ; case BYTES : return value . getByteStringValue ( ) ; case UUID : return new UUID ( value . getUuidMostSigBitsValue ( ) , value . getUuidLeastSigBitsValue ( ) ) ; case MULTITYPE_LIST : @ SuppressWarnings ( "rawtypes" ) final List list = new ArrayList ( ) ; for ( Multitype multi : value . getListList ( ) ) { list . add ( convertMultitypeToObject ( multi ) ) ; } return list ; default : throw new IllegalArgumentException ( String . format ( "Multitype value contains an unknown type: %s" , value . getType ( ) ) ) ; } }
Convert a {@link Multitype} object to an object that can be used within the Java environment.
Convert a { @link Multitype } object to an object that can be used within the Java environment .
//NOCHECKSTYLE -> Complexity 14; Max is 12. Need all switch cases to supply supported types