Package nz.org.riskscape.wizard.survey2
Interface BackingData
- All Known Implementing Classes:
BackingData.Empty
,Choices
,ExpressionScope
public interface BackingData
Interface for some data that 'backs' a particular question. Can be used to provide survey specific options for a question where perhaps the project alone is not a good enough reference.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic BackingData
Class<?>
default <T extends BackingData>
Optional<T>Functional style casting method for returning an Optional of the desired BackingData type.default boolean
isEmpty()
-
Method Details
-
empty
- Returns:
- an instance of empty BackingData for the type - use this in place of null to signal there is no BackingData.
-
isEmpty
default boolean isEmpty()- Returns:
- true if the this backing data is empty, i.e there is no backing data.
-
getParameterType
Class<?> getParameterType()- Returns:
- the class which corresponds to
Question.getParameterType()
this backing data. Mostly used for assertions and type safety checks in generic code.
-
isA
Functional style casting method for returning an Optional of the desired BackingData type.
-