summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMapTable.java
blob: b0d86c16b58671d5438587bf99bf1a3560826f42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
package org.eclipse.swt.internal.cocoa;

public class NSMapTable extends NSObject {

public NSMapTable() {
	super();
}

public NSMapTable(int id) {
	super(id);
}

public int count() {
	return OS.objc_msgSend(this.id, OS.sel_count);
}

public NSDictionary dictionaryRepresentation() {
	int result = OS.objc_msgSend(this.id, OS.sel_dictionaryRepresentation);
	return result != 0 ? new NSDictionary(result) : null;
}

public id initWithKeyOptions(int keyOptions, int valueOptions, int initialCapacity) {
	int result = OS.objc_msgSend(this.id, OS.sel_initWithKeyOptions_1valueOptions_1capacity_1, keyOptions, valueOptions, initialCapacity);
	return result != 0 ? new id(result) : null;
}

public id initWithKeyPointerFunctions(NSPointerFunctions keyFunctions, NSPointerFunctions valueFunctions, int initialCapacity) {
	int result = OS.objc_msgSend(this.id, OS.sel_initWithKeyPointerFunctions_1valuePointerFunctions_1capacity_1, keyFunctions != null ? keyFunctions.id : 0, valueFunctions != null ? valueFunctions.id : 0, initialCapacity);
	return result != 0 ? new id(result) : null;
}

public NSEnumerator keyEnumerator() {
	int result = OS.objc_msgSend(this.id, OS.sel_keyEnumerator);
	return result != 0 ? new NSEnumerator(result) : null;
}

public NSPointerFunctions keyPointerFunctions() {
	int result = OS.objc_msgSend(this.id, OS.sel_keyPointerFunctions);
	return result != 0 ? new NSPointerFunctions(result) : null;
}

public static id mapTableWithKeyOptions(int keyOptions, int valueOptions) {
	int result = OS.objc_msgSend(OS.class_NSMapTable, OS.sel_mapTableWithKeyOptions_1valueOptions_1, keyOptions, valueOptions);
	return result != 0 ? new id(result) : null;
}

public static id mapTableWithStrongToStrongObjects() {
	int result = OS.objc_msgSend(OS.class_NSMapTable, OS.sel_mapTableWithStrongToStrongObjects);
	return result != 0 ? new id(result) : null;
}

public static id mapTableWithStrongToWeakObjects() {
	int result = OS.objc_msgSend(OS.class_NSMapTable, OS.sel_mapTableWithStrongToWeakObjects);
	return result != 0 ? new id(result) : null;
}

public static id mapTableWithWeakToStrongObjects() {
	int result = OS.objc_msgSend(OS.class_NSMapTable, OS.sel_mapTableWithWeakToStrongObjects);
	return result != 0 ? new id(result) : null;
}

public static id mapTableWithWeakToWeakObjects() {
	int result = OS.objc_msgSend(OS.class_NSMapTable, OS.sel_mapTableWithWeakToWeakObjects);
	return result != 0 ? new id(result) : null;
}

public NSEnumerator objectEnumerator() {
	int result = OS.objc_msgSend(this.id, OS.sel_objectEnumerator);
	return result != 0 ? new NSEnumerator(result) : null;
}

public id objectForKey(id aKey) {
	int result = OS.objc_msgSend(this.id, OS.sel_objectForKey_1, aKey != null ? aKey.id : 0);
	return result != 0 ? new id(result) : 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 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);
}

public NSPointerFunctions valuePointerFunctions() {
	int result = OS.objc_msgSend(this.id, OS.sel_valuePointerFunctions);
	return result != 0 ? new NSPointerFunctions(result) : null;
}

}