mil.dod.th.ose.utils/src/mil/dod/th/ose/utils/ConfigurationUtils.java
public static Object parseStringsByType(final int type, final int cardinality, final String[] values)
    {
        Preconditions.checkNotNull(values);
        
        if (cardinality > 0)
        {
            // Return an array of objects
            final Object[] array = new Object[values.length];
            for (int i = 0; i < cardinality; ++i)
            {
                array[i] = parseStringByType(type, values[i]);
            }

            return array;
        }
        else if (cardinality < 0)
        {
            // Return a Vector of objects
            final Vector<Object> vector = new Vector<Object>(); // NOPMD: Use of Vector is required by MetaTypeService
            for (int i = 0; i < values.length; ++i)
            {
                vector.add(parseStringByType(type, values[i]));
            }

            return vector;
        }
        else
        {
            return parseStringByType(type, values[0]);
        }
    }
/**
     * Converts String[] attribute values (from MetaType attribute definitions) to what it is specified to be.
     * 
     * See {@link AttributeDefinition#getCardinality()} for information.
     * 
     * @param type
     *            the {@link AttributeDefinition} type
     * @param cardinality
     *            the {@link AttributeDefinition} cardinality
     * @param values
     *            the value that this attribute represents
     * @return parsed string of the desired type
     */
Converts String[] attribute values (from MetaType attribute definitions) to what it is specified to be.

See  AttributeDefinition#getCardinality() for information.

@param type
the  AttributeDefinition type
@param cardinality
the  AttributeDefinition cardinality
@param values
the value that this attribute represents
@return parsed string of the desired type
Converts String [] attribute values ( from MetaType attribute definitions ) to what it is specified to be . See AttributeDefinition#getCardinality () for information . @param type the AttributeDefinition type @param cardinality the AttributeDefinition cardinality @param values the value that this attribute represents @return parsed string of the desired type
public static Object parseStringsByType(final int type, final int cardinality, final String[] values)
    {
        Preconditions.checkNotNull(values);
        if (cardinality > 0)
        {
            final Object[] array = new Object[values.length];
            for (int i = 0; i < cardinality; ++i)
            {
                array[i] = parseStringByType(type, values[i]);
            }
            return array;
        }
        else if (cardinality < 0)
        {
            final Vector<Object> vector = new Vector<Object>(); 
            for (int i = 0; i < values.length; ++i)
            {
                vector.add(parseStringByType(type, values[i]));
            }
            return vector;
        }
        else
        {
            return parseStringByType(type, values[0]);
        }
    }
public static Object parseStringsByType ( final int type , final int cardinality , final String [ ] values ) { Preconditions . checkNotNull ( values ) ; if ( cardinality > 0 ) { final Object [ ] array = new Object [ values . length ] ; for ( int i = 0 ; i < cardinality ; ++ i ) { array [ i ] = parseStringByType ( type , values [ i ] ) ; } return array ; } else if ( cardinality < 0 ) { final Vector < Object > vector = new Vector < Object > ( ) ; for ( int i = 0 ; i < values . length ; ++ i ) { vector . add ( parseStringByType ( type , values [ i ] ) ) ; } return vector ; } else { return parseStringByType ( type , values [ 0 ] ) ; } }
Converts String[] attribute values (from MetaType attribute definitions) to what it is specified to be.
Converts String [] attribute values ( from MetaType attribute definitions ) to what it is specified to be .
// Return an array of objects // Return a Vector of objects // NOPMD: Use of Vector is required by MetaTypeService