Package java.util.prefs

Examples of java.util.prefs.Preferences.parent()


        pref.node("child2");
        pref.node("child3");
        child1.node("subchild1");

        assertSame(pref, child1.parent());
        assertEquals(3, pref.childrenNames().length);
    }

    public void testClear() throws BackingStoreException {
        pref.put("testClearKey", "testClearValue");
View Full Code Here


    {
        ArgUtil.notNull(new Object[] { prefs }, new String[] { "preferences" }, "resolve(java.util.prefs.Preferences)");

        List list = new ArrayList();
        Preferences preferences = prefs;
        while ((preferences.parent() != null) && (preferences.parent().parent() != null))
        {
            list.add(preferences.absolutePath());
            preferences = preferences.parent();
        }
        return (String[]) list.toArray(new String[0]);
View Full Code Here

    {
        ArgUtil.notNull(new Object[] { prefs }, new String[] { "preferences" }, "resolve(java.util.prefs.Preferences)");

        List list = new ArrayList();
        Preferences preferences = prefs;
        while ((preferences.parent() != null) && (preferences.parent().parent() != null))
        {
            list.add(preferences.absolutePath());
            preferences = preferences.parent();
        }
        return (String[]) list.toArray(new String[0]);
View Full Code Here

        List list = new ArrayList();
        Preferences preferences = prefs;
        while ((preferences.parent() != null) && (preferences.parent().parent() != null))
        {
            list.add(preferences.absolutePath());
            preferences = preferences.parent();
        }
        return (String[]) list.toArray(new String[0]);
    }

}
View Full Code Here

        Preferences cursor = this;
        StringBuffer retval = new StringBuffer();
        while (cursor != null) {
            if (cursor.name().length() > 0)
                retval.insert(0, cursor.name() + ".");
            cursor = cursor.parent();
        }
        return retval.toString();
    }

    @Override
View Full Code Here

   * Test method for {@link org.cellprofiler.preferences.CellProfilerPreferences#parent()}.
   */
  @Test
  public void testParent() {
    Preferences child = getCPRoot().node("/Foo/Bar");
    assertEquals("/Foo", child.parent().absolutePath());
  }

  /**
   * Test method for {@link org.cellprofiler.preferences.CellProfilerPreferences#node(java.lang.String)}.
   */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.