
public class WeakMapping extends Object
| Constructor and Description |
|---|
WeakMapping() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
get(Object instance,
String key)
Returns the Object associated with the given key in the (key, value)
mapping associated with the given Object instance.
|
static void |
set(Object instance,
String key,
Object value)
Associates a value with a given key in the (key, value) mapping associated
with the given Object instance.
|
static void |
setWeak(Object instance,
String key,
Object value)
Like
set(Object, String, Object), but doesn't guarantee that
value can be retrieved. |
public static Object get(Object instance, String key)
instance - the source Object.key - a String key.public static void set(Object instance, String key, Object value)
Due to restrictions of the Production Mode implementation, the instance argument must not be a String.
instance - the source Object, which must not be a String.key - a String key.value - the Object to associate with the key on the given source
Object.IllegalArgumentException - if instance is a String.public static void setWeak(Object instance, String key, Object value)
set(Object, String, Object), but doesn't guarantee that
value can be retrieved.Copyright © 2018. All rights reserved.