summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCharacterSet.java
blob: 9fe13dbfed8e067af0e75bf67e2ef784e2371819 (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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/*******************************************************************************
 * 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
 *******************************************************************************/
package org.eclipse.swt.internal.cocoa;

public class NSCharacterSet extends NSObject {

public NSCharacterSet() {
	super();
}

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

public static id alphanumericCharacterSet() {
	int result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_alphanumericCharacterSet);
	return result != 0 ? new id(result) : null;
}

public NSData bitmapRepresentation() {
	int result = OS.objc_msgSend(this.id, OS.sel_bitmapRepresentation);
	return result != 0 ? new NSData(result) : null;
}

public static id capitalizedLetterCharacterSet() {
	int result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_capitalizedLetterCharacterSet);
	return result != 0 ? new id(result) : null;
}

public boolean characterIsMember(short aCharacter) {
	return OS.objc_msgSend(this.id, OS.sel_characterIsMember_1, aCharacter) != 0;
}

public static id characterSetWithBitmapRepresentation(NSData data) {
	int result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_characterSetWithBitmapRepresentation_1, data != null ? data.id : 0);
	return result != 0 ? new id(result) : null;
}

public static id characterSetWithCharactersInString(NSString aString) {
	int result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_characterSetWithCharactersInString_1, aString != null ? aString.id : 0);
	return result != 0 ? new id(result) : null;
}

public static id characterSetWithContentsOfFile(NSString fName) {
	int result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_characterSetWithContentsOfFile_1, fName != null ? fName.id : 0);
	return result != 0 ? new id(result) : null;
}

public static id characterSetWithRange(NSRange aRange) {
	int result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_characterSetWithRange_1, aRange);
	return result != 0 ? new id(result) : null;
}

public static id controlCharacterSet() {
	int result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_controlCharacterSet);
	return result != 0 ? new id(result) : null;
}

public static id decimalDigitCharacterSet() {
	int result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_decimalDigitCharacterSet);
	return result != 0 ? new id(result) : null;
}

public static id decomposableCharacterSet() {
	int result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_decomposableCharacterSet);
	return result != 0 ? new id(result) : null;
}

public boolean hasMemberInPlane(byte thePlane) {
	return OS.objc_msgSend(this.id, OS.sel_hasMemberInPlane_1, thePlane) != 0;
}

public static id illegalCharacterSet() {
	int result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_illegalCharacterSet);
	return result != 0 ? new id(result) : null;
}

public NSCharacterSet invertedSet() {
	int result = OS.objc_msgSend(this.id, OS.sel_invertedSet);
	return result == this.id ? this : (result != 0 ? new NSCharacterSet(result) : null);
}

public boolean isSupersetOfSet(NSCharacterSet theOtherSet) {
	return OS.objc_msgSend(this.id, OS.sel_isSupersetOfSet_1, theOtherSet != null ? theOtherSet.id : 0) != 0;
}

public static id letterCharacterSet() {
	int result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_letterCharacterSet);
	return result != 0 ? new id(result) : null;
}

public boolean longCharacterIsMember(int theLongChar) {
	return OS.objc_msgSend(this.id, OS.sel_longCharacterIsMember_1, theLongChar) != 0;
}

public static id lowercaseLetterCharacterSet() {
	int result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_lowercaseLetterCharacterSet);
	return result != 0 ? new id(result) : null;
}

public static id newlineCharacterSet() {
	int result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_newlineCharacterSet);
	return result != 0 ? new id(result) : null;
}

public static id nonBaseCharacterSet() {
	int result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_nonBaseCharacterSet);
	return result != 0 ? new id(result) : null;
}

public static id punctuationCharacterSet() {
	int result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_punctuationCharacterSet);
	return result != 0 ? new id(result) : null;
}

public static id symbolCharacterSet() {
	int result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_symbolCharacterSet);
	return result != 0 ? new id(result) : null;
}

public static id uppercaseLetterCharacterSet() {
	int result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_uppercaseLetterCharacterSet);
	return result != 0 ? new id(result) : null;
}

public static id whitespaceAndNewlineCharacterSet() {
	int result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_whitespaceAndNewlineCharacterSet);
	return result != 0 ? new id(result) : null;
}

public static id whitespaceCharacterSet() {
	int result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_whitespaceCharacterSet);
	return result != 0 ? new id(result) : null;
}

}