/** * Remove the value if present. * If it were the last value for the key, the key is removed. * If it were the last key, the section is removed. * * @param sectionName the name of the section * @param key the key for the section * @param value the value for the key * @return whether the value was present and removed */ public boolean remove(String sectionName, String key, String value) { IniSection section = sectionMap.get(sectionName); if (section == null) { return false; } boolean changed = section.remove(key, value); if (changed) { if (section.isEmpty()) { sectionMap.remove(sectionName); list.remove(sectionName); } } return changed; }