public class ResourceValueMap
extends com.google.common.collect.ForwardingMap<java.lang.String,com.android.ide.common.rendering.api.ResourceValue>
Map that treats all the keys as resources names. This class takes care of the key flattening done by AAPT where
'.', '-' and ':' are all replaced with '_' and will be able to find resources with those characters in the name no matter the format.
Because of that, for ResourceValueMap keys like 'my.key', 'my_key' and 'my-key' are exactly the same key.
ResourceValueMap will keep the original names given to the resources so calls to keySet() will return the names without
modifications.
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(java.lang.Object key) |
static ResourceValueMap |
create() |
static ResourceValueMap |
createWithExpectedSize(int expectedSize) |
protected java.util.Map<java.lang.String,com.android.ide.common.rendering.api.ResourceValue> |
delegate() |
com.android.ide.common.rendering.api.ResourceValue |
get(java.lang.Object key) |
java.util.Set<java.lang.String> |
keySet() |
com.android.ide.common.rendering.api.ResourceValue |
put(java.lang.String key,
com.android.ide.common.rendering.api.ResourceValue value) |
com.android.ide.common.rendering.api.ResourceValue |
remove(java.lang.Object key) |
clear, containsValue, entrySet, equals, hashCode, isEmpty, putAll, size, standardClear, standardContainsKey, standardContainsValue, standardEquals, standardHashCode, standardIsEmpty, standardPutAll, standardRemove, standardToString, values@NonNull public static ResourceValueMap createWithExpectedSize(int expectedSize)
@NonNull public static ResourceValueMap create()
@NonNull protected java.util.Map<java.lang.String,com.android.ide.common.rendering.api.ResourceValue> delegate()
delegate in class com.google.common.collect.ForwardingMap<java.lang.String,com.android.ide.common.rendering.api.ResourceValue>public com.android.ide.common.rendering.api.ResourceValue put(@Nullable
java.lang.String key,
@NonNull
com.android.ide.common.rendering.api.ResourceValue value)
put in interface java.util.Map<java.lang.String,com.android.ide.common.rendering.api.ResourceValue>put in class com.google.common.collect.ForwardingMap<java.lang.String,com.android.ide.common.rendering.api.ResourceValue>public com.android.ide.common.rendering.api.ResourceValue get(@Nullable
java.lang.Object key)
get in interface java.util.Map<java.lang.String,com.android.ide.common.rendering.api.ResourceValue>get in class com.google.common.collect.ForwardingMap<java.lang.String,com.android.ide.common.rendering.api.ResourceValue>public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.String,com.android.ide.common.rendering.api.ResourceValue>containsKey in class com.google.common.collect.ForwardingMap<java.lang.String,com.android.ide.common.rendering.api.ResourceValue>public com.android.ide.common.rendering.api.ResourceValue remove(@Nullable
java.lang.Object key)
remove in interface java.util.Map<java.lang.String,com.android.ide.common.rendering.api.ResourceValue>remove in class com.google.common.collect.ForwardingMap<java.lang.String,com.android.ide.common.rendering.api.ResourceValue>public java.util.Set<java.lang.String> keySet()
keySet in interface java.util.Map<java.lang.String,com.android.ide.common.rendering.api.ResourceValue>keySet in class com.google.common.collect.ForwardingMap<java.lang.String,com.android.ide.common.rendering.api.ResourceValue>