ImmutableClassToInstanceMap.
See the Guava User Guide article on ClassToInstanceMap.
| Modifier and Type | Class and Description |
|---|---|
| private static class | MutableClassToInstanceMap.SerializedForm<B extends @Nullable Object>
Serialized form of the map, to avoid serializing the constraint. |
| Modifier and Type | Field and Description |
|---|---|
| private final Map |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static <T> T | |
| private static <B extends @Nullable Object> Map. | checkedEntry(final Map.
Wraps the |
| public static <B extends @Nullable Object> MutableClassToInstanceMap | |
| public static <B extends @Nullable Object> MutableClassToInstanceMap | |
| protected Map | delegate()
Implements abstract com. |
| public Set | entrySet()
Overrides com. Implements java. Set view of the mappings contained in this map.
|
| public <T extends @NonNull B> T | getInstance(Class<T> type)
Implements com. null if no entry for this class
is present.
|
| public B | put(Class<? extends @NonNull B>
key with which the specified value is to be associated key, B value to be associated with the specified key value)Overrides com. Implements java. |
| public void | putAll(Map<? extends Class<? extends @NonNull B>, ? extends B>
mappings to be stored in this map map)Overrides com. Implements java. |
| public <T extends B> T | putInstance(Class<@NonNull T> type, T value)
Implements com. |
| private void | |
| private Object |
| delegate | back to summary |
|---|---|
| private final Map<Class<? extends @NonNull B>, B> delegate | |
| MutableClassToInstanceMap | back to summary |
|---|---|
| private MutableClassToInstanceMap(Map<Class<? extends @NonNull B>, B> delegate) | |
| cast | back to summary |
|---|---|
private static <T> T cast(Class<T> type, Object value)
| |
| checkedEntry | back to summary |
|---|---|
| private static <B extends @Nullable Object> Map. Wraps the | |
| create | back to summary |
|---|---|
| public static <B extends @Nullable Object> MutableClassToInstanceMap Returns a new | |
| create | back to summary |
|---|---|
| public static <B extends @Nullable Object> MutableClassToInstanceMap Returns a new | |
| delegate | back to summary |
|---|---|
| protected Map Implements abstract com. Doc from com. Returns the backing delegate instance that methods are forwarded to. Abstract subclasses
generally override this method with an abstract method that has a more specific return type,
such as
| |
| entrySet | back to summary |
|---|---|
| public Set Overrides com. Implements java. Doc from java. Returns a | |
| getInstance | back to summary |
|---|---|
| public <T extends @NonNull B> T getInstance(Class<T> type) Implements com. Doc from com. Returns the value the specified class is mapped to, or
| |
| put | back to summary |
|---|---|
| public B put(Class<? extends @NonNull B> key, B value) Overrides com. Implements java. Doc from java. Associates the specified value with the specified key in this map
(optional operation). If the map previously contained a mapping for
the key, the old value is replaced by the specified value. (A map
| |
| putAll | back to summary |
|---|---|
| public void putAll(Map<? extends Class<? extends @NonNull B>, ? extends B> map) Overrides com. Implements java. Doc from java. Copies all of the mappings from the specified map to this map
(optional operation). The effect of this call is equivalent to that
of calling | |
| putInstance | back to summary |
|---|---|
| public <T extends B> T putInstance(Class<@NonNull T> type, T value) Implements com. Doc from com. Maps the specified class to the specified value. Does not associate this value with any of the class's supertypes.
| |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream stream) throws InvalidObjectException | |
| writeReplace | back to summary |
|---|---|
| private Object writeReplace() | |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Object |
| backingMap | back to summary |
|---|---|
| private final Map<Class<? extends @NonNull B>, B> backingMap | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| SerializedForm | back to summary |
|---|---|
| pack-priv SerializedForm(Map<Class<? extends @NonNull B>, B> backingMap) | |
| readResolve | back to summary |
|---|---|
| pack-priv Object readResolve() | |