public interface View<Input,Output>
Function which supports a polymorphic view of one class as another
| Modifier and Type | Interface and Description |
|---|---|
static class |
View.ViewException
Exception to indicate the reason a
view failed. |
| Modifier and Type | Method and Description |
|---|---|
Output |
as(Input theV)
Transform the object into the new view.
|
boolean |
canView(Input theInput,
Class<Output> theView)
Return whether or not the provided type of object can be viewed as the desired type.
|
Output as(Input theV) throws View.ViewException
theV - the object to changeView.ViewException - if there was an error changing the view of the object.boolean canView(Input theInput, Class<Output> theView)
as(Input) will always succeed.theInput - the type of the object whose view is to be changedtheView - the type of view we want.Copyright © 2010-2016 Stardog Union. All Rights Reserved.