Examples of keys()


Examples of org.apache.turbine.util.parser.ParameterParser.keys()

        ParameterParser pp = data.getParameters();

        String button = pp.convert(BUTTON);

        // Loop through and find the button.
        for (Enumeration e = pp.keys() ; e.hasMoreElements() ;)
        {
            String key = (String) e.nextElement();
            if (key.startsWith(button))
            {
                theButton = formatString(key);
View Full Code Here

Examples of org.apache.wink.json4j.JSONObject.keys()

    public void test_keys() {
        Exception ex = null;
        HashMap map = new HashMap();
        try {
            JSONObject jObject = new JSONObject("{\"foo\": \"bar\", \"number\": 1, \"bool\":null}");
            Iterator keys = jObject.keys();
            while (keys.hasNext()) {
                String key = (String)keys.next();
                map.put(key, key);
            }
        } catch (Exception ex1) {
View Full Code Here

Examples of org.apache.wink.json4j.compat.JSONObject.keys()

        HashMap map = new HashMap();
        try {
            System.setProperty("org.apache.wink.common.model.json.factory.impl", "org.apache.wink.json4j.compat.impl.ApacheJSONFactory");
            JSONFactory factory = JSONFactory.newInstance();
            JSONObject jObject = factory.createJSONObject("{\"foo\": \"bar\", \"number\": 1, \"bool\":null}");
            Iterator keys = jObject.keys();
            while (keys.hasNext()) {
                String key = (String)keys.next();
                map.put(key, key);
            }
        } catch (Exception ex1) {
View Full Code Here

Examples of org.biojava.bio.Annotation.keys()

      if (def == null) {
        Annotation annotation;
        Object definition;
        annotation = this.term.getAnnotation();
        definition = (annotation != null)
            && (annotation.keys().size() > 0) ? annotation
                .getProperty("def") : null;
                def = definition != null ? definition.toString() : "";
                def = def.replace("\\n", "\n").replace("\\t", "\t").replace("\\", "");
                def = def.trim();
      }
View Full Code Here

Examples of org.bouncycastle.jce.provider.BouncyCastleProvider.keys()

    static String[] getRegisteredAlgorithms(String prefix, String[] exclusionPatterns)
    {
        final BouncyCastleProvider prov = (BouncyCastleProvider)Security.getProvider("BC");

        List matches = new ArrayList();
        Enumeration algos = prov.keys();
        while (algos.hasMoreElements())
        {
            String algo = (String)algos.nextElement();
            if (!algo.startsWith(prefix))
            {
View Full Code Here

Examples of org.codehaus.jettison.json.JSONObject.keys()

    public static Map<String, Object> parseJSON(String jsonBody) throws JSONException {

        Map<String, Object> params = new HashMap<String, Object>();
        JSONObject obj = new JSONObject(jsonBody);
        Iterator it = obj.keys();
        while (it.hasNext()) {
            Object o = it.next();
            if (o instanceof String) {
                String key = (String)o;
                params.put(key, obj.get(key));
View Full Code Here

Examples of org.eclipse.core.internal.runtime.HashMapOfString.keys()

    tfile = new RandomAccessFile(taskFile, "rw");
    tfile.setLength(0); tfile.seek(0);
    outp = new PrintWriter(new FileWriter(taskFile));
   
    if (h != null)
     { String[] keys = h.keys();
       FLOOP: for (int i = 0; i < keys.length; i++)
        { for (int j = 0; j < excPatts.length; j++)     
           { Matcher matcher = excPatts[j].matcher(keys[i]);
             if (matcher.matches()) continue FLOOP;
          }
View Full Code Here

Examples of org.eclipse.core.runtime.preferences.IEclipsePreferences.keys()

      if (projectOptions == null) {
        // get eclipse preferences
        IEclipsePreferences projectPreferences= getEclipsePreferences();
        if (projectPreferences == null) return options; // cannot do better (non-Java project)
        // create project options
        String[] propertyNames = projectPreferences.keys();
        projectOptions = new Hashtable(propertyNames.length);
        for (int i = 0; i < propertyNames.length; i++){
          String propertyName = propertyNames[i];
          String value = projectPreferences.get(propertyName, null);
          if (value != null && optionNames.contains(propertyName)){
View Full Code Here

Examples of org.eclipse.equinox.security.storage.ISecurePreferences.keys()

            } else {
              if (node.nodeExists(host)) {
                ISecurePreferences hostNode = node.node(host);
                // holds the user names field in the secure
                // preference
                String[] usersKeys = hostNode.keys();
                List<String> usersList = hostToUsers.get(host);
                for (String userNode : usersKeys) {
                  if (!usersList.contains(userNode)) {
                    hostNode.remove(userNode);
                  }
View Full Code Here

Examples of org.eclipse.persistence.internal.identitymaps.IdentityMap.keys()

            ((AbstractSession)session).log(SessionLog.INFO, SessionLog.SERVER, "jmx_mbean_runtime_services_identity_map_non_existent", className);
            return;
        }

        //check if there are any objects in the identity map. Print if so.
        Enumeration objects = map.keys();
        if (!objects.hasMoreElements()) {
            ((AbstractSession)session).log(SessionLog.INFO, SessionLog.SERVER, "jmx_mbean_runtime_services_identity_map_empty", className);
        }

        CacheKey cacheKey;
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.