Class TypeMap
- java.lang.Object
-
- com.azure.spring.cloud.context.core.util.TypeMap
-
public class TypeMap extends Object
Mapping an object's type to the object.
-
-
Constructor Summary
Constructors Constructor Description TypeMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
get(Class<T> type)
Gets an instance from the TypeMap given the type.<T> void
put(Class<T> type, T instance)
Puts a new type and instance into the TypeMap.
-
-
-
Method Detail
-
put
public <T> void put(Class<T> type, T instance)
Puts a new type and instance into the TypeMap.- Type Parameters:
T
- The type.- Parameters:
type
- The type.instance
- The instance.
-
get
public <T> T get(Class<T> type)
Gets an instance from the TypeMap given the type.- Type Parameters:
T
- The type.- Parameters:
type
- The type.- Returns:
- The instance.
-
-