forked from GitLiveApp/firebase-java-sdk
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathBundle.java
More file actions
46 lines (34 loc) · 934 Bytes
/
Copy pathBundle.java
File metadata and controls
46 lines (34 loc) · 934 Bytes
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
package android.os;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
public class Bundle {
private final Map<String, Object> data;
public Bundle(Map<String, Object> data) {
this.data = data;
}
public Bundle(Bundle bundle) {
this.data = new HashMap<>(bundle.data);
}
public boolean containsKey(String key) {
if(data.containsKey(key)) return true;
throw new IllegalArgumentException(key);
}
public Set<String> keySet() {
return data.keySet();
}
public boolean getBoolean(String key) {
return (Boolean)data.get(key);
}
public Object get(String key) {
containsKey(key);
return data.get(key);
}
public String getString(String key) {
containsKey(key);
return (String)data.get(key);
}
public int getInt(String key) {
return (Integer)data.get(key);
}
}