Package net.starype.quiz.api.parser
Interface ConfigMapper<R>
-
- Type Parameters:
R
- the type of produced result
- All Known Implementing Classes:
BinaryLossMapper
,CleanSeparatorProcessorMapper
,CleanStringProcessorMapper
,DifficultyMapper
,DoubleEvaluatorMapper
,ExactEvaluatorMapper
,IntegerEvaluatorMapper
,LinearLossMapper
,MCQEvaluatorMapper
,TrueFalseProcessorMapper
,WordEvaluatorMapper
public interface ConfigMapper<R>
Maps a key name with an object generating procedure.
This allows the creation of more sophisticated objects from TOML values.getMapperName()
represents the value that a given key must be associated with in order for the mapper to take effect.
-
-
Method Summary
Modifier and Type Method Description java.lang.String
getMapperName()
R
map(ReadableMap config)
Produce a result of a specific type.
-
-
-
Method Detail
-
getMapperName
java.lang.String getMapperName()
- Returns:
- the value that may match a key from a TOML configuration file
-
map
R map(ReadableMap config)
Produce a result of a specific type.
The configuration object may be used to gather additional information required to construct the object.- Parameters:
config
- the configuration object loaded from the file- Returns:
- a result representing the value
-
-