T
- The model typepublic class ModelAndView<T>
extends java.lang.Object
Constructor and Description |
---|
ModelAndView()
Empty constructor.
|
ModelAndView(java.lang.String view,
T model)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.util.Optional<T> |
getModel() |
java.util.Optional<java.lang.String> |
getView() |
void |
setModel(T model)
Sets the model to use.
|
void |
setView(java.lang.String view)
Sets the view to use.
|
public ModelAndView()
public ModelAndView(java.lang.String view, T model)
view
- view name to be renderedmodel
- Model to be rendered against the viewpublic java.util.Optional<java.lang.String> getView()
public void setView(java.lang.String view)
view
- the view namepublic java.util.Optional<T> getModel()
public void setModel(T model)
model
- model to be rendered