/** * Remove the key if present. * If it were the last key for the section, the section is removed. * * @param key the key for the section * @return whether the key was present and removed */ public boolean removeValue(String key) { String section = getSectionName(); return section == null || remove(section, key); }
/** * Remove the value if present in the first section. * If it were the last value for the key, the key is removed. * If it were the last key, the section is removed. * * @param key the key for the section * @param value the value for the key * @return whether the value was present and removed */ public boolean removeValue(String key, String value) { String section = getSectionName(); return section == null || remove(section, key, value); }