Examples of objectAtIndex()


Examples of com.webobjects.foundation.NSMutableArray.objectAtIndex()

      NSArray immutableOptionalConfigurationFiles = arrayForKey("er.extensions.ERXProperties.OptionalConfigurationFiles");
      NSMutableArray optionalConfigurationFiles = null;
      if (immutableOptionalConfigurationFiles != null) {
        optionalConfigurationFiles = immutableOptionalConfigurationFiles.mutableClone();
        for (int i = 0; i < optionalConfigurationFiles.count(); i ++) {
          String optionalConfigurationFile = (String)optionalConfigurationFiles.objectAtIndex(i);
          if (!new File(optionalConfigurationFile).exists()) {
              String resourcePropertiesPath = ERXFileUtilities.pathForResourceNamed(optionalConfigurationFile, "app", null);
              if (resourcePropertiesPath != null) {
                  optionalConfigurationFiles.replaceObjectAtIndex(ERXProperties.getActualPath(resourcePropertiesPath), i);
              }
View Full Code Here

Examples of com.webobjects.foundation._NSThreadsafeMutableArray.objectAtIndex()

            Thread[] workers = new Thread[syncHosts.count()];
            for (int i = 0; i < workers.length; i++) {
                final int j = i;
                Runnable work = new Runnable() {
                    public void run() {
                        MHost aHost = (MHost) syncHosts.objectAtIndex(j);
                        aHost.sendRequestToWotaskd(aSyncRequest, true, true);
                    }
                };
                workers[j] = new Thread(work);
                workers[j].start();
View Full Code Here

Examples of org.rococoa.cocoa.foundation.NSArray.objectAtIndex()

                    shutdownLock.lock();
                    state = State.SHUTDOWN;
                    NSArray queuedTasks = queue.operations();
                    List<Runnable> result = new ArrayList<Runnable>(queuedTasks.count());
                    for (int i = 0; i < queuedTasks.count(); i++) {
                        NSOperation o = Rococoa.cast(queuedTasks.objectAtIndex(i), NSOperation.class);
                        InvocationFutureTask<?> task = tasks.get(o.id());
                        if ( task != null && !(o.isFinished() || o.isCancelled()) ) {
                            result.add(task.getOriginalRunnable());
                        }
                    }
View Full Code Here

Examples of org.rococoa.cocoa.foundation.NSArray.objectAtIndex()

        NSArray array = NSArray.CLASS.arrayWithObjects(
                NSNumber.CLASS.numberWithInt(42),
                NSNumber.CLASS.numberWithInt(64)
        );
        assertEquals(2, array.count());
        NSNumber second = Rococoa.cast(array.objectAtIndex(1), NSNumber.class);
        assertEquals(64, second.intValue());
    }
   
}
View Full Code Here

Examples of org.rococoa.cocoa.foundation.NSArray.objectAtIndex()

     */
    public static List<NSVoice> availableVoices() {
        NSArray availableVoices = CLASS.availableVoices();
        List<NSVoice> result = new ArrayList<NSVoice>(availableVoices.count());
        for (int i=0; i < availableVoices.count(); i++) {
            result.add(new NSVoice(CLASS.attributesForVoice(availableVoices.objectAtIndex(i).toString())));
        }
        return result;
    }

    /** Determine whether any application is currently generating speech through
View Full Code Here

Examples of org.rococoa.cocoa.foundation.NSArray.objectAtIndex()

     */
    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

Examples of org.rococoa.cocoa.foundation.NSArray.objectAtIndex()

        }
        try {
            final NSArray nsArray = NSRunningApplication.CLASS.runningApplicationsWithBundleIdentifier(bundleIdentifier);
            final int size = nsArray.count();
            for (int i = 0; i < size; i++) {
                final NSRunningApplication nsRunningApplication = Rococoa.cast(nsArray.objectAtIndex(i), NSRunningApplication.class);

                // This double-check of the bundle identifier is probably unnecessary...
                if (bundleIdentifier.equals(nsRunningApplication.bundleIdentifier())) {
                    // We've found the application, so we can skip the rest of the loop
                    return nsRunningApplication.processIdentifier();
View Full Code Here

Examples of org.rococoa.cocoa.foundation.NSArray.objectAtIndex()

    }
    try {
      final NSArray nsArray = NSRunningApplication.CLASS.runningApplicationsWithBundleIdentifier(_bundleIdentifier);
      final int size = nsArray.count();
      for (int i = 0; i < size; i++) {
        final NSRunningApplication nsRunningApplication = Rococoa.cast(nsArray.objectAtIndex(i), NSRunningApplication.class);

        // This double-check of the bundle identifier is probably unnecessary...
        if (_bundleIdentifier.equals(nsRunningApplication.bundleIdentifier())) {
          boolean result = nsRunningApplication.activateWithOptions(0);
          debugLog.debug("nsRunningApplication.activateWithOptions returned {}", result);
View Full Code Here

Examples of org.rococoa.cocoa.foundation.NSMutableArray.objectAtIndex()

    public List<Entry> getPronunciations() {
        NSMutableArray pronounciations = getValueAsType(Pronunciations, NSMutableArray.class);
        List<Entry> result = new ArrayList<Entry>(pronounciations.count());
        for (int i=0; i < pronounciations.count(); i++) {
            result.add(new Entry(Rococoa.cast(pronounciations.objectAtIndex(i), NSMutableDictionary.class)));
        }
        return Collections.unmodifiableList(result);
    }

    public void setPronunciations(List<Entry> pronounciations) {
View Full Code Here

Examples of org.rococoa.cocoa.foundation.NSMutableArray.objectAtIndex()

    public List<Entry> getAbbreviations() {
        NSMutableArray abbreviations = getValueAsType(Abbreviations, NSMutableArray.class);
        List<Entry> result = new ArrayList<Entry>(abbreviations.count());
        for (int i=0; i < abbreviations.count(); i++) {
            result.add(new Entry(Rococoa.cast(abbreviations.objectAtIndex(i), NSMutableDictionary.class)));
        }
        return Collections.unmodifiableList(result);
    }

    public void setAbbreviations(List<Entry> abbreviations) {
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.