public final class AspectMap extends Object
Constructor and Description |
---|
AspectMap() |
Modifier and Type | Method and Description |
---|---|
<A> A |
get(AspectType<A> type)
Get the correctly typed aspect for a type.
|
<A,C extends A> |
put(AspectType<A> type,
C aspect)
Put an aspect for specific type.
|
void |
remove(AspectType<?> type)
Remove the aspect for the given type from this map.
|
public final <A,C extends A> void put(@NotNull AspectType<A> type, @NotNull C aspect)
Example:
String aspect = ...;
AspectType<CharSequence> type = ...;
put(type, aspect);
A
- The type of the aspect.C
- The concrete implementation type of the aspect.type
- The aspect type.aspect
- The aspect implementation.public final void remove(AspectType<?> type)
type
- The aspect type.public final <A> A get(AspectType<A> type)
Example
AspectType<CharSequence> type = ...;
CharSequence aspect = get(type);
A
- The type of the aspect.type
- The aspect type to look up.Copyright © 2014 e-Spirit AG. All Rights Reserved. Build 5.0_BETA.500