Package java.util.prefs

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


        p.getDouble(null, 0.1);
        p.getInt(null, 1);
        p.getLong(null, 1l);
        p.isUserNode();
        try {
            p.keys();
        } catch (BackingStoreException e) {
        }
        p.name();
        p.node(null);
        try {
View Full Code Here


        assertEquals("8value", mock1.get("/K/E\\Y\\abc~@!#$%^&*(\\", null));
        assertNull(mock1.get("/k/e/y", null));
        assertEquals("7value", mock1.get("/K/E/Y", null));
        assertEquals("1value", mock1.get("key", null));

        String[] keys = mock1.keys();
        assertEquals(4, keys.length);
        for (int i = 0; i < keys.length; i++) {
            String key = keys[i];
            assertTrue("key".equals(key) || "KEY".equals(key)
                    || "/K/E/Y".equals(key)
View Full Code Here

            return null;
        }
        Map<String, Map<String, Integer>> result = new HashMap<String, Map<String, Integer>>(children.length);
        for (String child : children) {
            Preferences childPref = pref.node(child);
            String[] keys = childPref.keys();
            Map<String, Integer> values = new HashMap<String, Integer>(keys.length);
            for (String key : keys) {
                values.put(key, childPref.getInt(key, 1));
            }
            result.put(child, values);
View Full Code Here

            selectionIndexesSum = p.getInt("selectionIndexesSum", 0);
            totalCompletions = p.getInt("totalCompletions", 0);
            Preferences si = p.node("selectedIndexes");
            if (si != null) {
                selectedIndexes = new HashMap<String, Integer>();
                for (String k : si.keys()) {
                    selectedIndexes.put(k, si.getInt(k, 0));
                }
            }
        }
}      
View Full Code Here

      String clazz = prefs.get("class", null);
      Object obj = null;
    try {
      Class cls = Class.forName(clazz);
      obj = cls.newInstance();
        String[] keys = prefs.keys();
        for (int i = 0; i < keys.length; i++) {
          if (keys[i] != null && (!keys[i].startsWith("class <<") && !keys[i].equals("class")) ) {
            String val = prefs.get(keys[i], null);
            if (val != null) {
              String methodName = "set" + keys[i].substring(0,1).toUpperCase() + keys[i].substring(1);
View Full Code Here

            {
                Preferences node = ejbNode.node( childrenNames[i] );
               
                Map nodeMap = Collections.synchronizedMap( new HashMap() );
               
                String[] keys = node.keys();
               
                for ( int j = 0; j < keys.length; j++ )
                {
                    String value = node.get( keys[i], "" );
                   
View Full Code Here

                {
                    Preferences node = icNode.node( childrenNames[i] );
                   
                    Map nodeMap = Collections.synchronizedMap( new HashMap() );
                   
                    String[] keys = node.keys();
                   
                    for ( int j = 0; j < keys.length; j++ )
                    {
                        String value = node.get( keys[i], "" );
                       
View Full Code Here

                {
                    Preferences node = icEjbNode.node( childrenNames[i] );
                   
                    icConfig = Collections.synchronizedMap( new HashMap() );
                   
                    String[] keys = node.keys();
                   
                    for ( int j = 0; j < keys.length; j++ )
                    {
                        String value = node.get( keys[i], "" );
                       
View Full Code Here

      for ( int i = 0; i < childrenNames.length; i++ ) {
        Preferences node = ejbNode.node( childrenNames[i] );

        Map nodeMap = Collections.synchronizedMap( new HashMap() );

        String[] keys = node.keys();

        for ( int j = 0; j < keys.length; j++ ) {
          String value = node.get( keys[i], "" );

          if ( value != null ) {
View Full Code Here

        if ( !NODE_EJB.equalsIgnoreCase( childrenNames[i] ) ) {
          Preferences node = icNode.node( childrenNames[i] );

          Map nodeMap = Collections.synchronizedMap( new HashMap() );

          String[] keys = node.keys();

          for ( int j = 0; j < keys.length; j++ ) {
            String value = node.get( keys[i], "" );

            if ( value != null ) {
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.