Examples of allKeys()


Examples of com.dd.plist.NSDictionary.allKeys()

  private final List<WebkitApplication> apps = new ArrayList<WebkitApplication>();

  public ReportConnectedApplicationsMessage(String rawMessage) throws Exception {
    super(rawMessage);
    NSDictionary list = (NSDictionary) arguments.objectForKey("WIRApplicationDictionaryKey");
    String[] keys = list.allKeys();
    for (String key : keys) {
      NSDictionary app = (NSDictionary) list.objectForKey(key);
      WebkitApplication application = new WebkitApplication(app);
      apps.add(application);
    }
View Full Code Here

Examples of com.dd.plist.NSDictionary.allKeys()

  public ApplicationSentListingMessage(String rawMessage) throws Exception {
    super(rawMessage);

    NSDictionary list = (NSDictionary) arguments.objectForKey("WIRListingKey");
    String[] keys = list.allKeys();

    for (String key : keys) {
      NSDictionary page = (NSDictionary) list.objectForKey(key);
      pages.add(new WebkitPage(page));
    }
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.allKeys()

  public static Object toJavaCollections(Object obj) {
    Object result;
    if (obj instanceof NSDictionary) {
      Map map = new HashMap();
      NSDictionary nsDict = (NSDictionary) obj;
      Enumeration keysEnum = nsDict.allKeys().objectEnumerator();
      while (keysEnum.hasMoreElements()) {
        Object key = keysEnum.nextElement();
        Object value = nsDict.objectForKey(key);
        key = toJavaCollections(key);
        value = toJavaCollections(value);
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.allKeys()

  public static Object toJavaCollections(Object obj) {
    Object result;
    if (obj instanceof NSDictionary) {
      Map map = new HashMap();
      NSDictionary nsDict = (NSDictionary) obj;
      Enumeration keysEnum = nsDict.allKeys().objectEnumerator();
      while (keysEnum.hasMoreElements()) {
        Object key = keysEnum.nextElement();
        Object value = nsDict.objectForKey(key);
        key = toJavaCollections(key);
        value = toJavaCollections(value);
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.allKeys()

    catch (JSONException e) {
      throw new MarshallException("Could not add nsdictionary to object: " + e.getMessage());
    }
    Object key = null;
    try {
      Enumeration keyEnum = dictionary.allKeys().objectEnumerator();
      while (keyEnum.hasMoreElements()) {
        key = keyEnum.nextElement();
        Object value = dictionary.objectForKey(key);
        String keyString = key.toString(); // only support String keys
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.allKeys()

     */
    @SuppressWarnings("javadoc")
  public static Properties propertiesFromArgv(String[] argv) {
      ERXProperties._Properties properties = new ERXProperties._Properties();
        NSDictionary argvDict = NSProperties.valuesFromArgv(argv);
        Enumeration e = argvDict.allKeys().objectEnumerator();
        while (e.hasMoreElements()) {
            Object key = e.nextElement();
            properties.put(key, argvDict.objectForKey(key));
        }
        return properties;
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.allKeys()

      if (userInfo == null) {
        userInfo = NSDictionary.EmptyDictionary;
      }

      dos.writeShort(userInfo.count());
      for (Object key : userInfo.allKeys()) {
        byte[] keyBytes = key.toString().getBytes();
        byte[] valueBytes = userInfo.objectForKey(key).toString().getBytes();
        dos.writeShort(keyBytes.length);
        dos.write(keyBytes);
        dos.writeShort(valueBytes.length);
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.allKeys()

    loadModel(file.toURI().toURL());
  }

  private void loadModel(URL url) {
    NSDictionary def = (NSDictionary) NSPropertyListSerialization.propertyListWithPathURL(url);
    for (Enumeration keys = def.allKeys().objectEnumerator(); keys.hasMoreElements();) {
      String key = (String) keys.nextElement();
      NSDictionary indexDef = (NSDictionary) def.objectForKey(key);
      addIndex(key, indexDef);
    }
  }
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.allKeys()

            if(choices != null) {
                NSMutableArray keyChoices = new NSMutableArray();
                if(choices instanceof NSArray) {
                    for(Enumeration e = ((NSArray)choices).objectEnumerator(); e.hasMoreElements(); ) {
                        NSDictionary dict = (NSDictionary)e.nextElement();
                        String key = (String)dict.allKeys().lastObject();
                        String value = (String)dict.objectForKey(key);
                        keyChoices.addObject(new ERXKeyValuePair(key, ERXLocalizer.currentLocalizer().localizedStringForKeyWithDefault(value)));
                    }
                } else if(choices instanceof NSDictionary) {
                    NSArray keys = ((NSDictionary)choices).allKeys();
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.allKeys()

            if(choices != null) {
                NSMutableArray keyChoices = new NSMutableArray();
                if(choices instanceof NSArray) {
                    for(Enumeration e = ((NSArray)choices).objectEnumerator(); e.hasMoreElements(); ) {
                        NSDictionary dict = (NSDictionary)e.nextElement();
                        String key = (String)dict.allKeys().lastObject();
                        String value = (String)dict.objectForKey(key);
                        keyChoices.addObject(new ERXKeyValuePair(key, ERXLocalizer.currentLocalizer().localizedStringForKeyWithDefault(value)));
                    }
                } else if(choices instanceof NSDictionary) {
                    NSArray keys = ((NSDictionary)choices).allKeys();
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.