Package org.rococoa.cocoa.foundation

Examples of org.rococoa.cocoa.foundation.NSDictionary


                NSString.stringWithString("string value"),
                NSNumber.CLASS.numberWithInt(42));
        NSArray keys = NSArray.CLASS.arrayWithObjects(
                NSString.stringWithString("string key"),
                NSString.stringWithString("int key"));
        NSDictionary dictionary = NSDictionary.dictionaryWithObjects_forKeys(objects, keys);
       
        check(dictionary);
    }
View Full Code Here


       
        check(dictionary);
    }
   
    @Test public void testDictionaryWithObjectsAndKeys() {
        NSDictionary dictionary = NSDictionary.dictionaryWithObjectsAndKeys(
                NSString.stringWithString("string value"), NSString.stringWithString("string key"),
                NSNumber.CLASS.numberWithInt(42), NSString.stringWithString("int key"));
       
        check(dictionary);
    }
View Full Code Here

        }
    }

    @Test
    public void testNilReturnValues() {
        NSDictionary dict = NSDictionary.dictionaryWithObjectsAndKeys(
                NSString.stringWithString("Value"), NSString.stringWithString("Key")
        );
        ID id = dict.objectForKey((ID) null);
        assertNull(id);
        NSObject nsObject = dict.objectForKey((NSObject) null);
        assertNull(nsObject);
    }
View Full Code Here

        assertNull(nsObject);
    }

    @Test
    public void testReturnValues() {
        NSDictionary dict = NSDictionary.dictionaryWithObjectsAndKeys(
                NSString.stringWithString("Value"), NSString.stringWithString("Key")
        );
        ID id = dict.objectForKey(NSString.stringWithString("Key").id());
        assertNotNull(id);
        NSObject nsObject = dict.objectForKey(NSString.stringWithString("Key"));
        assertNotNull(nsObject);
    }
View Full Code Here

                    NSString.stringWithString(GROWL_NOTIFICATIONS_DEFAULT),
                    appImage != null ? NSString.stringWithString(GROWL_APP_ICON) : null
            );

            // Make the Dictionary
            NSDictionary regDict = NSDictionary.dictionaryWithObjects_forKeys(objects, keys);

            theCenter.postNotification(
                    GROWL_APP_REGISTRATION, // notificationName
                    null,                   // anObject
                    regDict,                // userInfoDictionary
View Full Code Here

     */
    public List<NSSpeechPhonemeInfo> getPhonemeInfo() {
        NSArray infos = Rococoa.cast(getProperty(SpeechProperty.PhonemeSymbolsProperty), NSArray.class);
        List<NSSpeechPhonemeInfo> result = new ArrayList<NSSpeechPhonemeInfo>(infos.count());
        for(int i=0; i < infos.count(); i++) {
            NSDictionary phonemeInfo = Rococoa.cast(infos.objectAtIndex(i), NSDictionary.class);
            result.add(new NSSpeechPhonemeInfo(NSMutableDictionary.dictionaryWithDictionary(phonemeInfo)));
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of org.rococoa.cocoa.foundation.NSDictionary

Copyright © 2018 www.massapicom. 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.