Code example for Preferences

Methods: getBooleangetIntputDouble

0
      assert false; 
    } 
    PreferencesExt prefs = store.getPreferences();
 
    Preferences node = prefs.node("/myApp");
    int ival  = node.getInt("extraOne", 0);
    assert ival == 1 : "testStandardChain fail 1 " + ival;
 
    ival  = node.getInt("extraTwo", 0);
    assert ival == 2 : "testStandardChain fail 2 " + ival;
 
    ival  = node.getInt("num_rows", 0);
    assert ival == 128 : "testStandardChain fail 3 " + ival;
 
    ival  = node.getInt("missing", 0);
    assert ival == 0 : "testStandardChain fail 4 " + ival;
 
    boolean bval  = node.getBoolean("TestBoolean", false);
    assert bval: "testStandardChain fail 5 " + bval;
 
    node.putDouble("TestFloat", -999.0F);
    node.putDouble("TestDouble", 3.14159);
    //prefs.exportSubtree( System.out); 
    try { 
      store.save();
      store = XMLStore.createFromFile(storeFile, null);
      prefs = store.getPreferences();