/** {@inheritDoc} */ public Collection<Object> values() { return getContent().values(); } }
/** {@inheritDoc} */ public Object get(Object key) { if (toUpdate.containsKey(key)) return toUpdate.get(key); return getContent().get(key); }
/** * Returns the string value associated with the specified key, or the * default value if the key does not exist. * * @param key The key to look up. * @param defaultValue The default value. * @return The string value associated with the specified key. */ String getString(String key, String defaultValue) { if (toUpdate.containsKey(key)) return toUpdate.get(key).toString(); return getContent().getString(key, defaultValue); }
/** {@inheritDoc} */ public boolean isEmpty() { return getContent().isEmpty(); }
/** {@inheritDoc} */ public boolean containsKey(Object key) { return getContent().containsKey(key); }
/** {@inheritDoc} */ public Set<Map.Entry<String, Object>> entrySet() { return getContent().entrySet(); }
/** * Returns the string value associated with the specified key. * * @param key The key to look up. * @return The string value associated with the specified key. */ String getString(String key) { if (toUpdate.containsKey(key)) return toUpdate.get(key).toString(); return getContent().getString(key); }
/** * Returns the string array value associated with the specified key. * * @param key The key to look up. * @return The string array value associated with the specified key. */ String[] getStringArray(String key) { if (toUpdate.containsKey(key)) { return ((String)toUpdate.get(key)).split("\\|"); } return getContent().getStringArray(key); }
/** {@inheritDoc} */ public boolean containsValue(Object value) { return getContent().containsValue(value); }
/** {@inheritDoc} */ public Set<String> keySet() { return getContent().keySet(); }
/** {@inheritDoc} */ public int size() { return getContent().size(); }
/** * Returns the long value associated with the specified key. * * @param key The key to look up. * @return The long value associated with the specified key. */ long getLong(String key) { if (toUpdate.containsKey(key)) return Value.toLong(toUpdate.get(key).toString()); return getContent().getLong(key); }
/** * Returns the long value associated with the specified key. * * @param key The key to look up. * @param defaultValue The default value. * @return The long value associated with the specified key. */ long getLong(String key, int defaultValue) { if (toUpdate.containsKey(key)) return Value.toLong(toUpdate.get(key).toString()); return getContent().getLong(key, defaultValue); }
/** * Returns the floating point value associated with the specified key. * * @param key The key to look up. * @return The floating point value associated with the specified key. */ float getFloat(String key) { if (toUpdate.containsKey(key)) return Value.toFloat(toUpdate.get(key).toString()); return getContent().getFloat(key); }
/** * Returns the integer point value associated with the specified key. * * @param key The key to look up. * @return The integer point value associated with the specified key. */ int getInteger(String key) { if (toUpdate.containsKey(key)) return Value.toInteger(toUpdate.get(key).toString()); return getContent().getInteger(key); }
/** * Returns the Boolean value associated with the specified key. Values * can be converted from: 0, 1, true, false. * * @param key The key to look up. * @return The Boolean value associated with the specified key. */ boolean getBoolean(String key) { if (toUpdate.containsKey(key)) return Value.toBoolean(toUpdate.get(key).toString()); return getContent().getBoolean(key); }
/** * Returns the long value associated with the specified key. Long values * can be converted from: number, numberMB, numberGB. * * @param key The key to look up. * @return The long value associated with the specified key. */ long getByteCount(String key) { if (toUpdate.containsKey(key)) return Value.toByteCount(toUpdate.get(key).toString()); return getContent().getByteCount(key); }
/** * Returns the integer value associated with the specified key. * * @param key The key to look up. * @param defaultValue The default value. * @return The integer value associated with the specified key. */ int getInteger(String key, int defaultValue) { if (toUpdate.containsKey(key)) return Value.toInteger(toUpdate.get(key).toString()); return getContent().getInteger(key, defaultValue); }
/** * Returns a date value associated with the specified key, or the default * value if the key does not exist. Date values can be converted from * standard UTC time formats. * * @param key The key to look up. * @param defaultValue The default value. * @return The date value associated with the specified key. */ Date getDate(String key, Date defaultValue) { if (toUpdate.containsKey(key)) return Value.toDate(toUpdate.get(key).toString()); return getContent().getDate(key, defaultValue); }
/** * Returns the Boolean value associated with the specified key, or the * default value if the key does not exist. Boolean values can be converted * from: 0, 1, true, false. * * @param key The key to look up. * @param defaultValue The default value. * @return The Boolean value associated with the specified key. */ boolean getBoolean(String key, boolean defaultValue) { if (toUpdate.containsKey(key)) return Value.toBoolean(toUpdate.get(key).toString()); return getContent().getBoolean(key, defaultValue); }