/** * Adds an attribute of type * {@link com.google.api.gbase.client.GoogleBaseAttributeType#INT_UNIT}. * * This method will never remove an attribute, even if it has * the same name as the new attribute. If you would like to set * an attribute that can only appear once, call * {@link #removeAttributes(String, GoogleBaseAttributeType)} first. * * @param name attribute name * @param value attribute value * @return the attribute object that has been created and added to the item */ public GoogleBaseAttribute addIntUnitAttribute(String name, NumberUnit<Integer> value) { return addAttribute(new GoogleBaseAttribute(name, GoogleBaseAttributeType.INT_UNIT, value.toString())); }
/** * Adds an attribute of type * {@link com.google.api.gbase.client.GoogleBaseAttributeType#NUMBER_UNIT}. * * This method will never remove an attribute, even if it has * the same name as the new attribute. If you would like to set * an attribute that can only appear once, call * {@link #removeAttributes(String, GoogleBaseAttributeType)} first. * * @param name attribute name * @param value attribute value * @return the attribute object that has been created and added to the item */ public GoogleBaseAttribute addNumberUnitAttribute(String name, NumberUnit<Number> value) { return addAttribute(new GoogleBaseAttribute(name, GoogleBaseAttributeType.NUMBER_UNIT, value.toString())); }
/** * Adds an attribute of type * {@link com.google.api.gbase.client.GoogleBaseAttributeType#FLOAT_UNIT}. * * This method will never remove an attribute, even if it has * the same name as the new attribute. If you would like to set * an attribute that can only appear once, call * {@link #removeAttributes(String, GoogleBaseAttributeType)} first. * * @param name attribute name * @param value attribute value * @return the attribute object that has been created and added to the item */ public GoogleBaseAttribute addFloatUnitAttribute(String name, NumberUnit<Float> value) { return addAttribute(new GoogleBaseAttribute(name, GoogleBaseAttributeType.FLOAT_UNIT, value.toString())); }
/** * Adds an attribute of type * {@link com.google.api.gbase.client.GoogleBaseAttributeType#INT_UNIT}. * * This method will never remove an attribute, even if it has * the same name as the new attribute. If you would like to set * an attribute that can only appear once, call * {@link #removeAttributes(String, GoogleBaseAttributeType)} first. * * @param name attribute name * @param value attribute value * @return the attribute object that has been created and added to the item */ public GoogleBaseAttribute addIntUnitAttribute(String name, NumberUnit<Integer> value) { return addAttribute(new GoogleBaseAttribute(name, GoogleBaseAttributeType.INT_UNIT, value.toString())); }
/** * Adds an attribute of type * {@link com.google.api.gbase.client.GoogleBaseAttributeType#NUMBER_UNIT}. * * This method will never remove an attribute, even if it has * the same name as the new attribute. If you would like to set * an attribute that can only appear once, call * {@link #removeAttributes(String, GoogleBaseAttributeType)} first. * * @param name attribute name * @param value attribute value * @return the attribute object that has been created and added to the item */ public GoogleBaseAttribute addNumberUnitAttribute(String name, NumberUnit<Number> value) { return addAttribute(new GoogleBaseAttribute(name, GoogleBaseAttributeType.NUMBER_UNIT, value.toString())); }
/** * Adds an attribute of type * {@link com.google.api.gbase.client.GoogleBaseAttributeType#FLOAT_UNIT}. * * This method will never remove an attribute, even if it has * the same name as the new attribute. If you would like to set * an attribute that can only appear once, call * {@link #removeAttributes(String, GoogleBaseAttributeType)} first. * * @param name attribute name * @param value attribute value * @return the attribute object that has been created and added to the item */ public GoogleBaseAttribute addFloatUnitAttribute(String name, NumberUnit<Float> value) { return addAttribute(new GoogleBaseAttribute(name, GoogleBaseAttributeType.FLOAT_UNIT, value.toString())); }