|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.omnaest.utils.beans.autowired.AutowiredContainerAbstract<E>
org.omnaest.utils.beans.autowired.ClassMapToAutowiredContainerAdapter<E>
public class ClassMapToAutowiredContainerAdapter<E>
Adapter to allow Maps to be treated as AutowiredContainer. The key of the Map will be the Class
of an element and the value will be the element itself.
AutowiredContainer,
Serialized Form| Constructor Summary | |
|---|---|
protected |
ClassMapToAutowiredContainerAdapter()
|
protected |
ClassMapToAutowiredContainerAdapter(Map<Class<? extends E>,E> classToObjectMap)
|
| Method Summary | ||
|---|---|---|
protected Set<Class<? extends E>> |
determineAssignableTypeSet(Class<? extends E> type)
|
|
|
getValueSet(Class<? extends O> type)
Returns a Set for all values which can be assigned to the given Class. |
|
Iterator<E> |
iterator()
|
|
static
|
newInstance(Map<Class<? extends E>,E> classToObjectMap)
Creates a new instance of a AutowiredContainer for a given Map |
|
static
|
newInstanceUsingLinkedHashMap()
Creates a new instance of a AutowiredContainer using a regular LinkedHashMap |
|
AutowiredContainer<E> |
put(E object)
Adds an Object to the AutowiredContainer using its Object.getClass() as primary type. |
|
|
put(O object,
Class<? extends O>... types)
Adds an Object to the AutowiredContainer for one or more given Class types. |
|
AutowiredContainer<E> |
removeAllAssignableTo(Class<? extends E> type)
Removes all elements within the AutowiredContainer which are Class.isAssignableFrom(Class) to the given type. |
|
AutowiredContainer<E> |
removeAllHavingExactTypeOf(Class<? extends E> type)
Removes all elements within the AutowiredContainer which are put into the container with the given primary type. |
|
| Methods inherited from class org.omnaest.utils.beans.autowired.AutowiredContainerAbstract |
|---|
containsAssignable, equals, getValue, hashCode, isEmpty, putAll, remove, size, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected ClassMapToAutowiredContainerAdapter(Map<Class<? extends E>,E> classToObjectMap)
classToObjectMap - protected ClassMapToAutowiredContainerAdapter()
ClassMapToAutowiredContainerAdapter| Method Detail |
|---|
public static <E> AutowiredContainer<E> newInstanceUsingLinkedHashMap()
AutowiredContainer using a regular LinkedHashMap
public static <E> AutowiredContainer<E> newInstance(Map<Class<? extends E>,E> classToObjectMap)
AutowiredContainer for a given Map
classToObjectMap -
public <O extends E> Set<O> getValueSet(Class<? extends O> type)
AutowiredContainerSet for all values which can be assigned to the given Class.
protected Set<Class<? extends E>> determineAssignableTypeSet(Class<? extends E> type)
type -
public AutowiredContainer<E> put(E object)
AutowiredContainerObject to the AutowiredContainer using its Object.getClass() as primary type.
AutowiredContainer.put(Object, Class...),
AutowiredContainer.putAll(Iterable)public Iterator<E> iterator()
public <O extends E> AutowiredContainer<E> put(O object,
Class<? extends O>... types)
AutowiredContainerObject to the AutowiredContainer for one or more given Class types.
AutowiredContainer.put(Object)public AutowiredContainer<E> removeAllHavingExactTypeOf(Class<? extends E> type)
AutowiredContainerAutowiredContainer which are put into the container with the given primary type.
AutowiredContainer.removeAllAssignableTo(Class)public AutowiredContainer<E> removeAllAssignableTo(Class<? extends E> type)
AutowiredContainerAutowiredContainer which are Class.isAssignableFrom(Class) to the given type.
AutowiredContainer.removeAllHavingExactTypeOf(Class)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||