Code example for AbstractPreferences

Methods: addNodeChangeListenernoderemoveNodeChangeListener

0
        mncl.assertRemoved(true);
    } 
 
    public void testRemoveNodeChangeListener() throws BackingStoreException, InterruptedException { 
        MockNodeChangeListener mncl = new MockNodeChangeListener();
        parent.addNodeChangeListener(mncl);
        pref.node("test");
        mncl.assertAdded(false);
        mncl.assertRemoved(false);
        parent.removeNodeChangeListener(mncl);
        pref.removeNode();
        mncl.assertAdded(false);
        mncl.assertRemoved(false);
        parent.node("new node");
        mncl.assertAdded(false);
        mncl.assertRemoved(false);
    } 
 
    public void testExportNode() throws BackingStoreException, IOException, InvalidPreferencesFormatException { 
        AbstractPreferences ap = (AbstractPreferences) pref.node("New node");
Contextual code suggestions in your IDE  Get Codota for Java