Package com.google.errorprone.refaster
Class Bindings
- java.lang.Object
-
- com.google.common.collect.ForwardingObject
-
- com.google.common.collect.ForwardingMap<Bindings.Key<?>,Object>
-
- com.google.errorprone.refaster.Bindings
-
- All Implemented Interfaces:
Map<Bindings.Key<?>,Object>
public class Bindings extends com.google.common.collect.ForwardingMap<Bindings.Key<?>,Object>
A type-safe map from objects of typeBindings.Key<V>
, which consist of aString
key and aBindings.Key
subclass, to values of typeV
.- Author:
- Louis Wasserman
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Bindings.Key<V>
A key type for aBinding
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Bindings
create()
static Bindings
create(Bindings bindings)
static <V> Bindings
create(Bindings.Key<V> key, V value)
static <V1,V2>
Bindingscreate(Bindings.Key<V1> key1, V1 value1, Bindings.Key<V2> key2, V2 value2)
protected Map<Bindings.Key<?>,Object>
delegate()
<V> V
getBinding(Bindings.Key<V> key)
Object
put(Bindings.Key<?> key, Object value)
void
putAll(Map<? extends Bindings.Key<?>,? extends Object> map)
<V> V
putBinding(Bindings.Key<V> key, V value)
Bindings
unmodifiable()
-
Methods inherited from class com.google.common.collect.ForwardingMap
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, remove, size, standardClear, standardContainsKey, standardContainsValue, standardEquals, standardHashCode, standardIsEmpty, standardPutAll, standardRemove, standardToString, values
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
create
public static Bindings create()
-
create
public static <V> Bindings create(Bindings.Key<V> key, V value)
-
create
public static <V1,V2> Bindings create(Bindings.Key<V1> key1, V1 value1, Bindings.Key<V2> key2, V2 value2)
-
delegate
protected Map<Bindings.Key<?>,Object> delegate()
- Specified by:
delegate
in classcom.google.common.collect.ForwardingMap<Bindings.Key<?>,Object>
-
getBinding
public <V> V getBinding(Bindings.Key<V> key)
-
putBinding
public <V> V putBinding(Bindings.Key<V> key, V value)
-
put
public Object put(Bindings.Key<?> key, Object value)
- Specified by:
put
in interfaceMap<Bindings.Key<?>,Object>
- Overrides:
put
in classcom.google.common.collect.ForwardingMap<Bindings.Key<?>,Object>
-
putAll
public void putAll(Map<? extends Bindings.Key<?>,? extends Object> map)
- Specified by:
putAll
in interfaceMap<Bindings.Key<?>,Object>
- Overrides:
putAll
in classcom.google.common.collect.ForwardingMap<Bindings.Key<?>,Object>
-
unmodifiable
public Bindings unmodifiable()
-
-