Package com.d3x.core.repo
Class RepoMaster
- java.lang.Object
-
- com.d3x.core.repo.RepoMaster
-
public class RepoMaster extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description RepoMaster(java.util.Collection<Repo<?>> repos)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> voidregisterIfAbsent(Repo<T> repo)Registers a repo if one is not already registered<T> Repo<T>repo(java.lang.Class<T> type)Returns the repo for the type specified
-
-
-
Field Detail
-
repoMap
private final java.util.Map<java.lang.Class<?>,Repo> repoMap
-
-
Constructor Detail
-
RepoMaster
public RepoMaster(java.util.Collection<Repo<?>> repos)
Constructor- Parameters:
repos- the collection of repos
-
-
Method Detail
-
registerIfAbsent
public <T> void registerIfAbsent(Repo<T> repo)
Registers a repo if one is not already registered- Type Parameters:
T- the repo type- Parameters:
repo- the repo to register
-
repo
public <T> Repo<T> repo(java.lang.Class<T> type)
Returns the repo for the type specified- Type Parameters:
T- the repo type- Parameters:
type- the data type- Returns:
- the repo match
-
-