add more stubs

This commit is contained in:
Julian Winkler
2023-11-08 21:40:39 +01:00
parent 9f74ab811e
commit 72a8b3a047
21 changed files with 128 additions and 34 deletions

View File

@@ -94,6 +94,27 @@ public class BaseBundle {
return (s == null) ? defaultValue : s;
}
/**
* Returns the value associated with the given key, or defaultValue if
* no mapping of the desired type exists for the given key.
*
* @param key a String
* @param defaultValue Value to return if key does not exist
* @return a long value
*/
public long getLong(String key, long defaultValue) {
Object o = mMap.get(key);
if (o == null) {
return defaultValue;
}
try {
return (Long)o;
} catch (ClassCastException e) {
typeWarning(key, o, "Long", defaultValue, e);
return defaultValue;
}
}
/**
* Inserts a long value into the mapping of this Bundle, replacing
* any existing value for the given key.

View File

@@ -795,27 +795,6 @@ public final class Bundle extends BaseBundle implements Cloneable {
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.
*
* @param key a String
* @param defaultValue Value to return if key does not exist
* @return a long value
*/
public long getLong(String key, long defaultValue) {
Object o = mMap.get(key);
if (o == null) {
return defaultValue;
}
try {
return (Long)o;
} catch (ClassCastException e) {
typeWarning(key, o, "Long", defaultValue, e);
return defaultValue;
}
}
/**
* Returns the value associated with the given key, or 0.0f if
* no mapping of the desired type exists for the given key.