コード例 #1
0
ファイル: Configuration.java プロジェクト: kurawal/imsdroid
 public boolean setEntry(String sectionName, String entryKey, String entryValue) {
   if (StringUtils.isNullOrEmpty(sectionName) || StringUtils.isNullOrEmpty(entryKey)) {
     return false;
   }
   ConfigurationSection section = new ConfigurationSection(sectionName);
   int index = this.sections.indexOf(section);
   if (index == -1) {
     section.addEntry(new ConfigurationSectionEntry(entryKey, entryValue));
     return this.sections.add(section);
   } else {
     section = this.sections.get(index);
     section.addEntry(new ConfigurationSectionEntry(entryKey, entryValue));
     // this.sections.set(index, section);
     return true;
   }
 }