- All Implemented Interfaces:
Models, Iterable<String>
@RequestScoped
public class ModelsImpl
extends Object
implements Models
Implementation of
Models interface. A CDI class that delegates
to a
Map implementation.
-
Constructor Summary
Constructors
-
Method Summary
Returns a unmodifiable view of the models map.
Retrieve a model by name.
<T> T
Retrieve a model by name in a type-safe way.
Stores a new model in the map.
-
Constructor Details
-
ModelsImpl
public ModelsImpl()
-
Method Details
-
put
Description copied from interface: Models
Stores a new model in the map.
- Specified by:
put in interface Models
- Parameters:
name - name of the model
model - model to store in the map
- Returns:
- the current instance to allow method chaining
-
get
Description copied from interface: Models
Retrieve a model by name.
- Specified by:
get in interface Models
- Parameters:
name - name of the model
- Returns:
- the model or
null
-
get
Description copied from interface: Models
Retrieve a model by name in a type-safe way.
- Specified by:
get in interface Models
- Type Parameters:
T - type of the model
- Parameters:
name - name of the model
type - type of the model
- Returns:
- The model or
null
-
asMap
Description copied from interface: Models
Returns a unmodifiable view of the models map.
- Specified by:
asMap in interface Models
- Returns:
- unmodifiable map
-