/** * Set the value of the <code>name</code> property to a <code>float</code>. * * @param name property name. * @param value property value. */ public void setFloat(String name, float value) { set(name, Float.toString(value)); }
/** * Set the value of the <code>name</code> property to a <code>double</code>. * * @param name property name. * @param value property value. */ public void setDouble(String name, double value) { set(name, Double.toString(value)); }
/** * Set the given property to <code>Pattern</code>. * If the pattern is passed as null, sets the empty pattern which results in * further calls to getPattern(...) returning the default value. * * @param name property name * @param pattern new value */ public void setPattern(String name, Pattern pattern) { if (null == pattern) { set(name, null); } else { set(name, pattern.pattern()); } }
/** * Set the value of the <code>name</code> property to a <code>long</code>. * * @param name property name. * @param value <code>long</code> value of the property. */ public void setLong(String name, long value) { set(name, Long.toString(value)); }
/** * Set the value of the <code>name</code> property to a <code>float</code>. * * @param name property name. * @param value property value. */ public void setFloat(String name, float value) { set(name, Float.toString(value)); }
/** * Set the value of the <code>name</code> property to a <code>boolean</code>. * * @param name property name. * @param value <code>boolean</code> value of the property. */ public void setBoolean(String name, boolean value) { set(name, Boolean.toString(value)); }
/** * Set the value of the <code>name</code> property to the given type. This * is equivalent to <code>set(<name>, value.toString())</code>. * @param name property name * @param value new value */ public <T extends Enum<T>> void setEnum(String name, T value) { set(name, value.toString()); }
/** * Set the value of the <code>name</code> property to the given type. This * is equivalent to <code>set(<name>, value.toString())</code>. * @param name property name * @param value new value */ public <T extends Enum<T>> void setEnum(String name, T value) { set(name, value.toString()); }
/** * Set the value of the <code>name</code> property to a <code>boolean</code>. * * @param name property name. * @param value <code>boolean</code> value of the property. */ public void setBoolean(String name, boolean value) { set(name, Boolean.toString(value)); }
/** * Set the value of the <code>name</code> property to an <code>int</code>. * * @param name property name. * @param value <code>int</code> value of the property. */ public void setInt(String name, int value) { set(name, Integer.toString(value)); }
/** * Set the value of the <code>name</code> property to an <code>int</code>. * * @param name property name. * @param value <code>int</code> value of the property. */ public void setInt(String name, int value) { set(name, Integer.toString(value)); }
/** * Set the value of the <code>name</code> property to a <code>double</code>. * * @param name property name. * @param value property value. */ public void setDouble(String name, double value) { set(name, Double.toString(value)); }
/** * Set the given property to <code>Pattern</code>. * If the pattern is passed as null, sets the empty pattern which results in * further calls to getPattern(...) returning the default value. * * @param name property name * @param pattern new value */ public void setPattern(String name, Pattern pattern) { if (null == pattern) { set(name, null); } else { set(name, pattern.pattern()); } }
/** * Set the value of the <code>name</code> property to a <code>long</code>. * * @param name property name. * @param value <code>long</code> value of the property. */ public void setLong(String name, long value) { set(name, Long.toString(value)); }
/** * Set the value of the <code>name</code> property to the name of a * <code>theClass</code> implementing the given interface <code>xface</code>. * * An exception is thrown if <code>theClass</code> does not implement the * interface <code>xface</code>. * * @param name property name. * @param theClass property value. * @param xface the interface implemented by the named class. */ public void setClass(String name, Class<?> theClass, Class<?> xface) { if (!xface.isAssignableFrom(theClass)) { throw new RuntimeException(theClass + " not " + xface.getName()); } set(name, theClass.getName()); }
/** * Sets a property if it is currently unset. * @param name the property name * @param value the new value */ public synchronized void setIfUnset(String name, String value) { if (get(name) == null) { set(name, value); } }
/** * Set the array of string values for the <code>name</code> property as * as comma delimited values. * * @param name property name. * @param values The values */ public void setStrings(String name, String... values) { set(name, StringUtils.arrayToString(values)); }
/** * Set the value of the <code>name</code> property to the name of a * <code>theClass</code> implementing the given interface <code>xface</code>. * * An exception is thrown if <code>theClass</code> does not implement the * interface <code>xface</code>. * * @param name property name. * @param theClass property value. * @param xface the interface implemented by the named class. */ public void setClass(String name, Class<?> theClass, Class<?> xface) { if (!xface.isAssignableFrom(theClass)) { throw new RuntimeException(theClass + " not " + xface.getName()); } set(name, theClass.getName()); }
/** * Sets a property if it is currently unset. * @param name the property name * @param value the new value */ public synchronized void setIfUnset(String name, String value) { if (get(name) == null) { set(name, value); } }
/** * Set the array of string values for the <code>name</code> property as * as comma delimited values. * * @param name property name. * @param values The values */ public void setStrings(String name, String... values) { set(name, StringUtils.arrayToString(values)); }