summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableDictionary.java
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableDictionary.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableDictionary.java44
1 files changed, 12 insertions, 32 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableDictionary.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableDictionary.java
index bccee1df56..d2ce57c316 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableDictionary.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableDictionary.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.swt.internal.cocoa;
@@ -16,50 +16,30 @@ public NSMutableDictionary() {
super();
}
-public NSMutableDictionary(int id) {
+public NSMutableDictionary(int /*long*/ id) {
super(id);
}
-public void addEntriesFromDictionary(NSDictionary otherDictionary) {
- OS.objc_msgSend(this.id, OS.sel_addEntriesFromDictionary_1, otherDictionary != null ? otherDictionary.id : 0);
+public NSMutableDictionary(id id) {
+ super(id);
}
public static NSMutableDictionary dictionaryWithCapacity(int numItems) {
- int result = OS.objc_msgSend(OS.class_NSMutableDictionary, OS.sel_dictionaryWithCapacity_1, numItems);
+ int result = OS.objc_msgSend(OS.class_NSMutableDictionary, OS.sel_dictionaryWithCapacity_, numItems);
return result != 0 ? new NSMutableDictionary(result) : null;
}
-public NSMutableDictionary initWithCapacity(int numItems) {
- int result = OS.objc_msgSend(this.id, OS.sel_initWithCapacity_1, numItems);
- return result != 0 ? this : null;
-}
-
-public void removeAllObjects() {
- OS.objc_msgSend(this.id, OS.sel_removeAllObjects);
-}
-
-public void removeObjectForKey(id aKey) {
- OS.objc_msgSend(this.id, OS.sel_removeObjectForKey_1, aKey != null ? aKey.id : 0);
-}
-
-public void removeObjectsForKeys(NSArray keyArray) {
- OS.objc_msgSend(this.id, OS.sel_removeObjectsForKeys_1, keyArray != null ? keyArray.id : 0);
-}
-
-public void setDictionary(NSDictionary otherDictionary) {
- OS.objc_msgSend(this.id, OS.sel_setDictionary_1, otherDictionary != null ? otherDictionary.id : 0);
-}
-
public void setObject(id anObject, id aKey) {
- OS.objc_msgSend(this.id, OS.sel_setObject_1forKey_1, anObject != null ? anObject.id : 0, aKey != null ? aKey.id : 0);
+ OS.objc_msgSend(this.id, OS.sel_setObject_forKey_, anObject != null ? anObject.id : 0, aKey != null ? aKey.id : 0);
}
-public void setObject(id anObject, int aKey) {
- OS.objc_msgSend(this.id, OS.sel_setObject_1forKey_1, anObject != null ? anObject.id : 0, aKey);
+public void setValue(id value, NSString key) {
+ OS.objc_msgSend(this.id, OS.sel_setValue_forKey_, value != null ? value.id : 0, key != null ? key.id : 0);
}
-public void setValue(id value, NSString key) {
- OS.objc_msgSend(this.id, OS.sel_setValue_1forKey_1, value != null ? value.id : 0, key != null ? key.id : 0);
+public static NSDictionary dictionaryWithObject(id object, id key) {
+ int result = OS.objc_msgSend(OS.class_NSMutableDictionary, OS.sel_dictionaryWithObject_forKey_, object != null ? object.id : 0, key != null ? key.id : 0);
+ return result != 0 ? new NSMutableDictionary(result) : null;
}
}