You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
multiple additions and fixes for the Java APIs
Stuff needed for WhatsApp support
This commit is contained in:
@@ -62,6 +62,16 @@ public class BaseBundle {
|
||||
return mMap.containsKey(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the entry with the given key as an object.
|
||||
*
|
||||
* @param key a String key
|
||||
* @return an Object, or null
|
||||
*/
|
||||
public Object get(String key) {
|
||||
return mMap.get(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value associated with the given key, or null if
|
||||
* no mapping of the desired type exists for the given key or a null
|
||||
@@ -94,6 +104,17 @@ public class BaseBundle {
|
||||
return (s == null) ? defaultValue : s;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value associated with the given key, or 0L if
|
||||
* no mapping of the desired type exists for the given key.
|
||||
*
|
||||
* @param key a String
|
||||
* @return a long value
|
||||
*/
|
||||
public long getLong(String key) {
|
||||
return getLong(key, 0L);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value associated with the given key, or defaultValue if
|
||||
* no mapping of the desired type exists for the given key.
|
||||
|
||||
Reference in New Issue
Block a user