Package com.complexible.common.view
Interface View<Input,Output>
- All Known Subinterfaces:
AdminConnectionView<Input,,Output> ConnectionView<I,O>
public interface View<Input,Output>
Function which supports a polymorphic view of one class as another
- Since:
- 2.2
- Version:
- 2.2
- Author:
- Michael Grove
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classException to indicate the reason aviewfailed. -
Method Summary
-
Method Details
-
as
Transform the object into the new view.- Parameters:
theV- the object to change- Returns:
- the view of the object
- Throws:
View.ViewException- if there was an error changing the view of the object.
-
canView
Return whether or not the provided type of object can be viewed as the desired type. If true, calls toas(Input)will always succeed.- Parameters:
theInput- the type of the object whose view is to be changedtheView- the type of view we want.- Returns:
- true if the object can be viewed as the view class, false otherwise.
-