Interface CreationContextStorage
public interface CreationContextStorage
This class defined all the main methods needed to be able to store and/or access to
a
CreationalContext and its content-
Method Summary
Modifier and TypeMethodDescriptionGives all theContextualids that have been stored<T> CreationContext<T> Gives theCreationContextcorresponding to the givenContextualidgetId()Gives the id of the storage.voidremoveInstance(String id) Removes from the storage the instance corresponding to the givenContextualid<T> TsetInstance(String id, CreationContext<T> creationContext) Stores an instance for the givenContextualid
-
Method Details
-
getId
String getId()Gives the id of the storage. TwoCreationContextStoragecorresponding to the same context must have the same id. -
setInstance
Stores an instance for the givenContextualid- Parameters:
id- the id of the contextual for which we want to set a valuecreationContext- theCreationContextused for the instance creation- Returns:
- the instance that has been effectively set.
-
getCreationContext
Gives theCreationContextcorresponding to the givenContextualid- Parameters:
id- the id of the contextual for which we want to retrieve theCreationContext- Returns:
- the corresponding
CreationalContextif it exists,nullotherwise
-
removeInstance
Removes from the storage the instance corresponding to the givenContextualid- Parameters:
id- the id of the contextual for which we want to remove the instance
-
getAllIds
Gives all theContextualids that have been stored- Returns:
- a
Setcontaining all the ids that have been used to store aCreationContext
-