@@ -0,0 +1,1877 @@
+package adakite.prefs;%0A%0Aimport adakite.util.AdakiteUtils;%0Aimport java.util.prefs.Preferences;%0A%0A/**%0A * Wrapper class for %7B@link java.util.prefs.Preferences%7D.%0A */%0Apublic class Prefs %7B%0A%0A  private Preferences prefs;%0A%0A  private Prefs() %7B%7D%0A%0A  public Prefs(Preferences prefs) %7B%0A    this.prefs = prefs;%0A  %7D%0A%0A  /**%0A   * Sets the specified key to the specified value.%0A   *%0A   * @param key specified key%0A   * @param val specified value%0A   */%0A  public void set(String key, String val) %7B%0A    this.prefs.put(key, val);%0A  %7D%0A%0A  /**%0A   * Returns the corresponding value of the specified key.%0A   *%0A   * @param key specified key%0A   * @throws IllegalStateException if the value has not been previously set%0A   */%0A  public String get(String key) %7B%0A    String val = this.prefs.get(key, %22%22);%0A    if (AdakiteUtils.isNullOrEmpty(val)) %7B%0A      throw new IllegalStateException(%22value not set for: %22 + key);%0A    %7D%0A    return val;%0A  %7D%0A%0A  /**%0A   * Tests whether the specified key has been previously set.%0A   *%0A   * @param key specified key%0A   */%0A  public boolean hasValue(String key) %7B%0A    try %7B%0A      get(key);%0A      return true;%0A    %7D catch (Exception ex) %7B%0A      return false;%0A    %7D%0A  %7D%0A%0A  /**%0A   * Tests whether the corresponding value to the specified key is TRUE%0A   * or FALSE.%0A   *%0A   * @param key specified key%0A   */%0A  public boolean isEnabled(String key) %7B%0A    try %7B%0A      String val = get(key);%0A      return val.equalsIgnoreCase(Boolean.TRUE.toString());%0A    %7D catch (Exception ex) %7B%0A      return false;%0A    %7D%0A  %7D%0A%0A  /**%0A   * Sets the specified key to the specified boolean value.%0A   *%0A   * @param key specified key%0A   * @param enabled specified boolean value%0A   */%0A  public void setEnabled(String key, boolean enabled) %7B%0A    set(key, Boolean.toString(enabled));%0A  %7D%0A%0A  public Prefs getChild(String nodeName) %7B%0A    Preferences child = this.prefs.node(nodeName);%0A    return new Prefs(child);%0A  %7D%0A%0A%7D%0A

Add file Prefs.java