This source file includes following definitions.
- create
- newEnv
- getEnv
- getNull
- set
- set
- get
- get
- delete
- delete
- size
- size
- getKey
- getKey
- clone
- dup
- dup
- free
- free
- isNull
- isNull
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package mpi;
23
24
25
26
27 public final class Info implements Freeable, Cloneable
28 {
29 protected long handle;
30 protected static final long NULL = getNull();
31
32
33
34
35
36 public Info() throws MPIException
37 {
38 MPI.check();
39 handle = create();
40 }
41
42 protected Info(long handle)
43 {
44 this.handle = handle;
45 }
46
47 private native long create();
48
49 protected static Info newEnv()
50 {
51 return new Info(getEnv());
52 }
53
54 private native static long getEnv();
55 private native static long getNull();
56
57
58
59
60
61
62
63 public void set(String key, String value) throws MPIException
64 {
65 MPI.check();
66 set(handle, key, value);
67 }
68
69 private native void set(long handle, String key, String value)
70 throws MPIException;
71
72
73
74
75
76
77
78 public String get(String key) throws MPIException
79 {
80 MPI.check();
81 return get(handle, key);
82 }
83
84 private native String get(long handle, String key) throws MPIException;
85
86
87
88
89
90
91 public void delete(String key) throws MPIException
92 {
93 MPI.check();
94 delete(handle, key);
95 }
96
97 private native void delete(long handle, String key) throws MPIException;
98
99
100
101
102
103
104 public int size() throws MPIException
105 {
106 MPI.check();
107 return size(handle);
108 }
109
110 private native int size(long handle) throws MPIException;
111
112
113
114
115
116
117
118 public String getKey(int i) throws MPIException
119 {
120 MPI.check();
121 return getKey(handle, i);
122 }
123
124 private native String getKey(long handle, int i) throws MPIException;
125
126
127
128
129
130
131
132 @Override public Info clone()
133 {
134 try
135 {
136 return dup();
137 }
138 catch(MPIException e)
139 {
140 throw new RuntimeException(e.getMessage());
141 }
142 }
143
144
145
146
147
148
149 public Info dup() throws MPIException
150 {
151 MPI.check();
152 return new Info(dup(handle));
153 }
154
155 private native long dup(long handle) throws MPIException;
156
157
158
159
160
161 @Override public void free() throws MPIException
162 {
163 MPI.check();
164 handle = free(handle);
165 }
166
167 private native long free(long handle) throws MPIException;
168
169
170
171
172
173 public boolean isNull()
174 {
175 return isNull(handle);
176 }
177
178 private native boolean isNull(long handle);
179
180 }