Code example for ArrayList

Methods: size, toArray

0
        ArrayList<EncodedStringValue> list =
                (ArrayList<EncodedStringValue>) mHeaderMap.get(field);
        if (null == list) {
            return null; 
        } 
        EncodedStringValue[] values = new EncodedStringValue[list.size()];
        return list.toArray(values);
    } 
 
    /** 
     * Set EncodedStringValue value to pdu header by header field. 
     * 
     * @param value the value 
     * @param field the field 
     * @return the EncodedStringValue value of the pdu header 
     *          with specified header field 
     * @throws NullPointerException if the value is null. 
     */ 
    public void setEncodedStringValue(EncodedStringValue value, int field) {
        /** 
         * Check whether this field can be set for specific