Isn't Android's Bundle functionally equivalent with a Map ?
Isn't Android's Bundle functionally equivalent with a Map ?
No, Android's Bundle is not functionally equivalent to a Map. While both are used to store key-value pairs, there are several important differences:
A Map can have keys of any type, while a Bundle requires String keys.
A Bundle implements Parcelable, which is important for Android IPC (Inter-Process Communication). It allows Bundles to be used as service parameters and attached to Intents or passed into Activities. In contrast, Map is an interface and does not extend Parcelable.
Đăng nhập để tham gia thảo luận cùng mọi người.
Chưa có bình luận nào
Hãy là người đầu tiên chia sẻ suy nghĩ của bạn.