/** * Set this value as an object. * <br> * If this Value is being set to a non-default value for the first time * (as designated by <code>originalString</code> being null), then the * value is remembered as <em>original</em>. This original value is used * for equality and hashCode computation if this Value is * {@link #isDynamic() dynamic}. * */ public void setObject(Object obj) { // if setting to null set as string to get defaults into play if (obj == null && def != null) setString(null); else { try { setInternalObject(obj); if (originalValue == null && obj != null && !isDefault(obj)) { originalValue = getString(); } } catch (ParseException pe) { throw pe; } catch (RuntimeException re) { throw new ParseException(prop + ": " + obj, re); } } }
/** * Set this value as an object. * <br> * If this Value is being set to a non-default value for the first time * (as designated by <code>originalString</code> being null), then the * value is remembered as <em>original</em>. This original value is used * for equality and hashCode computation if this Value is * {@link #isDynamic() dynamic}. * */ public void setObject(Object obj) { // if setting to null set as string to get defaults into play if (obj == null && def != null) setString(null); else { try { setInternalObject(obj); if (originalValue == null && obj != null && !isDefault(obj)) { originalValue = getString(); } } catch (ParseException pe) { throw pe; } catch (RuntimeException re) { throw new ParseException(prop + ": " + obj, re); } } }
/** * Set this value as an object. * <br> * If this Value is being set to a non-default value for the first time * (as designated by <code>originalString</code> being null), then the * value is remembered as <em>original</em>. This original value is used * for equality and hashCode computation if this Value is * {@link #isDynamic() dynamic}. * */ public void setObject(Object obj) { // if setting to null set as string to get defaults into play if (obj == null && def != null) setString(null); else { try { setInternalObject(obj); if (originalValue == null && obj != null && !isDefault(obj)) { originalValue = getString(); } } catch (ParseException pe) { throw pe; } catch (RuntimeException re) { throw new ParseException(prop + ": " + obj, re); } } }
/** * Set this value as an object. * <br> * If this Value is being set to a non-default value for the first time * (as designated by <code>originalString</code> being null), then the * value is remembered as <em>original</em>. This original value is used * for equality and hashCode computation if this Value is * {@link #isDynamic() dynamic}. * */ public void setObject(Object obj) { // if setting to null set as string to get defaults into play if (obj == null && def != null) setString(null); else { try { setInternalObject(obj); if (originalValue == null && obj != null && !isDefault(obj)) { originalValue = getString(); } } catch (ParseException pe) { throw pe; } catch (RuntimeException re) { throw new ParseException(prop + ": " + obj, re); } } }
/** * Set this value from the given string. If the given string is null or * empty and a default is defined, the default is used. If the given * string(or default) is an alias key, it will be converted to the * corresponding value internally. * <br> * If this Value is being set to a non-default value for the first time * (as designated by <code>originalString</code> being null), then the * value is remembered as <em>original</em>. This original value is used * for equality and hashCode computation if this Value is * {@link #isDynamic() dynamic}. * */ public void setString(String val) { assertChangeable(); String str = unalias(val); try { setInternalString(str); if (originalValue == null && val != null && !isDefault(val)) { originalValue = getString(); } } catch (ParseException pe) { throw pe; } catch (RuntimeException re) { throw new ParseException(prop + ": " + val, re); } }
/** * Set this value from the given string. If the given string is null or * empty and a default is defined, the default is used. If the given * string(or default) is an alias key, it will be converted to the * corresponding value internally. * <br> * If this Value is being set to a non-default value for the first time * (as designated by <code>originalString</code> being null), then the * value is remembered as <em>original</em>. This original value is used * for equality and hashCode computation if this Value is * {@link #isDynamic() dynamic}. * */ public void setString(String val) { assertChangeable(); String str = unalias(val); try { setInternalString(str); if (originalValue == null && val != null && !isDefault(val)) { originalValue = getString(); } } catch (ParseException pe) { throw pe; } catch (RuntimeException re) { throw new ParseException(prop + ": " + val, re); } }
/** * Set this value from the given string. If the given string is null or * empty and a default is defined, the default is used. If the given * string(or default) is an alias key, it will be converted to the * corresponding value internally. * <br> * If this Value is being set to a non-default value for the first time * (as designated by <code>originalString</code> being null), then the * value is remembered as <em>original</em>. This original value is used * for equality and hashCode computation if this Value is * {@link #isDynamic() dynamic}. * */ public void setString(String val) { assertChangeable(); String str = unalias(val); try { setInternalString(str); if (originalValue == null && val != null && !isDefault(val)) { originalValue = getString(); } } catch (ParseException pe) { throw pe; } catch (RuntimeException re) { throw new ParseException(prop + ": " + val, re); } }
/** * Set this value from the given string. If the given string is null or * empty and a default is defined, the default is used. If the given * string(or default) is an alias key, it will be converted to the * corresponding value internally. * <br> * If this Value is being set to a non-default value for the first time * (as designated by <code>originalString</code> being null), then the * value is remembered as <em>original</em>. This original value is used * for equality and hashCode computation if this Value is * {@link #isDynamic() dynamic}. * */ public void setString(String val) { assertChangeable(); String str = unalias(val); try { setInternalString(str); if (originalValue == null && val != null && !isDefault(val)) { originalValue = getString(); } } catch (ParseException pe) { throw pe; } catch (RuntimeException re) { throw new ParseException(prop + ": " + val, re); } }