@ParametersAreNonnullByDefault public interface TypeMap<H> extends ByTypeSupplier<H,RuntimeException>
Modifier and Type | Method and Description |
---|---|
default H |
get(Type t)
get the object associated to a compatible type, only if there is only one.
|
Set<H> |
getAll(Type t)
Get all Objects associated to all unrelated compatible types.
|
H |
getExact(Type t)
Get the the Object associated to type.
|
boolean |
putIfNotPresent(Type type,
H object)
Associate object to type if no existing association present.
|
boolean |
remove(Type type)
remove type association.
|
default TypeMap<H> |
safePut(Type type,
H object)
Associate object with type.
|
@Nonnull Set<H> getAll(Type t)
t
- @Nullable default H get(Type t)
get
in interface ByTypeSupplier<H,RuntimeException>
t
- @Nullable H getExact(Type t)
t
- @CheckReturnValue boolean putIfNotPresent(Type type, H object)
type
- object
- default TypeMap<H> safePut(Type type, H object)
type
- object
- @CheckReturnValue boolean remove(Type type)
type
- Copyright © 2018 SPF4J. All rights reserved.