47 public abstract ArrayList<String>
getKeys();
65 public abstract int getInt(String key,
int defaultValue);
83 public abstract long getLong(String key,
long defaultValue);
101 public abstract boolean getBool(String key,
boolean defaultValue);
119 public abstract float getFloat(String key,
float defaultValue);
137 public abstract double getDouble(String key,
double defaultValue);
155 public abstract String
getString(String key, String defaultValue);
171 public abstract void putInt(String key,
int value);
187 public abstract void putLong(String key,
long value);
203 public abstract void putBool(String key,
boolean value);
219 public abstract void putFloat(String key,
float value);
235 public abstract void putDouble(String key,
double value);
251 public abstract void putString(String key, String value);
266 public abstract void remove(String key);
284 private final long nativeRef;
285 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
287 private CppProxy(
long nativeRef)
289 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
290 this.nativeRef = nativeRef;
293 private native
void nativeDestroy(
long nativeRef);
294 public void _djinni_private_destroy()
296 boolean destroyed = this.destroyed.getAndSet(
true);
297 if (!destroyed) nativeDestroy(this.nativeRef);
299 protected void finalize() throws
java.lang.Throwable
301 _djinni_private_destroy();
308 public boolean contains(String key)
310 assert !this.destroyed.get() :
"trying to use a destroyed object";
311 return native_contains(this.nativeRef, key);
313 private native
boolean native_contains(
long _nativeRef, String key);
316 public ArrayList<String> getKeys()
318 assert !this.destroyed.get() :
"trying to use a destroyed object";
319 return native_getKeys(this.nativeRef);
321 private native ArrayList<String> native_getKeys(
long _nativeRef);
324 public int getInt(String key,
int defaultValue)
326 assert !this.destroyed.get() :
"trying to use a destroyed object";
327 return native_getInt(this.nativeRef, key, defaultValue);
329 private native
int native_getInt(
long _nativeRef, String key,
int defaultValue);
332 public long getLong(String key,
long defaultValue)
334 assert !this.destroyed.get() :
"trying to use a destroyed object";
335 return native_getLong(this.nativeRef, key, defaultValue);
337 private native
long native_getLong(
long _nativeRef, String key,
long defaultValue);
340 public boolean getBool(String key,
boolean defaultValue)
342 assert !this.destroyed.get() :
"trying to use a destroyed object";
343 return native_getBool(this.nativeRef, key, defaultValue);
345 private native
boolean native_getBool(
long _nativeRef, String key,
boolean defaultValue);
348 public float getFloat(String key,
float defaultValue)
350 assert !this.destroyed.get() :
"trying to use a destroyed object";
351 return native_getFloat(this.nativeRef, key, defaultValue);
353 private native
float native_getFloat(
long _nativeRef, String key,
float defaultValue);
356 public double getDouble(String key,
double defaultValue)
358 assert !this.destroyed.get() :
"trying to use a destroyed object";
359 return native_getDouble(this.nativeRef, key, defaultValue);
361 private native
double native_getDouble(
long _nativeRef, String key,
double defaultValue);
364 public String getString(String key, String defaultValue)
366 assert !this.destroyed.get() :
"trying to use a destroyed object";
367 return native_getString(this.nativeRef, key, defaultValue);
369 private native String native_getString(
long _nativeRef, String key, String defaultValue);
372 public void putInt(String key,
int value)
374 assert !this.destroyed.get() :
"trying to use a destroyed object";
375 native_putInt(this.nativeRef, key, value);
377 private native
void native_putInt(
long _nativeRef, String key,
int value);
380 public void putLong(String key,
long value)
382 assert !this.destroyed.get() :
"trying to use a destroyed object";
383 native_putLong(this.nativeRef, key, value);
385 private native
void native_putLong(
long _nativeRef, String key,
long value);
388 public void putBool(String key,
boolean value)
390 assert !this.destroyed.get() :
"trying to use a destroyed object";
391 native_putBool(this.nativeRef, key, value);
393 private native
void native_putBool(
long _nativeRef, String key,
boolean value);
396 public void putFloat(String key,
float value)
398 assert !this.destroyed.get() :
"trying to use a destroyed object";
399 native_putFloat(this.nativeRef, key, value);
401 private native
void native_putFloat(
long _nativeRef, String key,
float value);
404 public void putDouble(String key,
double value)
406 assert !this.destroyed.get() :
"trying to use a destroyed object";
407 native_putDouble(this.nativeRef, key, value);
409 private native
void native_putDouble(
long _nativeRef, String key,
double value);
412 public void putString(String key, String value)
414 assert !this.destroyed.get() :
"trying to use a destroyed object";
415 native_putString(this.nativeRef, key, value);
417 private native
void native_putString(
long _nativeRef, String key, String value);
420 public void remove(String key)
422 assert !this.destroyed.get() :
"trying to use a destroyed object";
423 native_remove(this.nativeRef, key);
425 private native
void native_remove(
long _nativeRef, String key);
430 assert !this.destroyed.get() :
"trying to use a destroyed object";
431 native_clear(this.nativeRef);
433 private native
void native_clear(
long _nativeRef);