/** * Removes the specified named property value from {@link PropertiesBuilder}. * <p> * If the specified property is not contained by the {@link PropertiesBuilder}, * nothing happens. If the specified property is defined, only the value * is removed. Its default value will remain defined. * * @param name The name of the property value to remove. */ @Deprecated public void removePropertyValue(String name) { Property property = properties.get(name); if (property != null) { property.setValue(null); } }
/** * Sets the specified named property to have the specified value. * * @param name the name of the property * @param value the value of the property * * @return the {@link PropertiesBuilder} to which the property was added so * that further chained method calls, like to other * <code>setProperty(...)</code> methods on this class may be used */ public PropertiesBuilder setProperty(String name, Object value) { if (containsProperty(name)) { properties.get(name).setValue(value); } else { properties.put(name, new Property(name, value, null)); } return this; }
/** * Sets the specified named property to use an {@link Iterator}. * (to provide successive requests for the property with values from the said * {@link Iterator} when the {@link PropertiesBuilder} is realized) * * @param name the name of the property * @param iterator an {@link Iterator} that will provide successive property * values for the property when the {@link PropertiesBuilder} * is realized * * @return the {@link PropertiesBuilder} to which the property was added so * that further chained method calls, like to other * <code>setProperty(...)</code> methods on this class may be used. */ public PropertiesBuilder setProperty(String name, Iterator<?> iterator) { if (containsProperty(name)) { properties.get(name).setValue(iterator); } else { properties.put(name, new Property(name, iterator, null)); } return this; }