/** * Gets the first value of a specific attribute, as a * {@link com.google.api.gbase.client.Shipping}. * * This method does not check the type of the attribute * that's being queried, it just gets the value and try * and convert it. * * @param name attribute name * @return value of the attribute or null if no attribute * with this name was found on the list * @exception NumberFormatException if some value was * found that could not be converted. */ public Shipping getShippingAttribute(String name) { GoogleBaseAttribute value = getAttribute(name); if (value == null) { return null; } return ConversionUtil.extractShipping(value); }
/** * Gets the first value of a specific attribute, as a * {@link com.google.api.gbase.client.Shipping}. * * This method does not check the type of the attribute * that's being queried, it just gets the value and try * and convert it. * * @param name attribute name * @return value of the attribute or null if no attribute * with this name was found on the list * @exception NumberFormatException if some value was * found that could not be converted. */ public Shipping getShippingAttribute(String name) { GoogleBaseAttribute value = getAttribute(name); if (value == null) { return null; } return ConversionUtil.extractShipping(value); }
/** * Gets all the values of a specific attribute, as a list of * {@link com.google.api.gbase.client.Shipping}s. * * This method does not check the type of the attribute * that's being queried, it just gets the values and try * and convert them. * * @param name attribute name * @return a list of Shipping, which might be empty but not null * @exception NumberFormatException if some value was * found that could not be converted */ public List<? extends Shipping> getShippingAttributes(String name) { List<Shipping> retval = new ArrayList<Shipping>(); for (GoogleBaseAttribute attr: attributes) { if (hasNameAndType(attr, name, GoogleBaseAttributeType.SHIPPING)) { retval.add(ConversionUtil.extractShipping(attr)); } } return retval; }
/** * Gets all the values of a specific attribute, as a list of * {@link com.google.api.gbase.client.Shipping}s. * * This method does not check the type of the attribute * that's being queried, it just gets the values and try * and convert them. * * @param name attribute name * @return a list of Shipping, which might be empty but not null * @exception NumberFormatException if some value was * found that could not be converted */ public List<? extends Shipping> getShippingAttributes(String name) { List<Shipping> retval = new ArrayList<Shipping>(); for (GoogleBaseAttribute attr: attributes) { if (hasNameAndType(attr, name, GoogleBaseAttributeType.SHIPPING)) { retval.add(ConversionUtil.extractShipping(attr)); } } return retval; }