Interface SexprMapper
- All Known Implementing Classes:
ModelMapper
public interface SexprMapper
An interface for mapping S-expressions to objects
-
Method Summary
Modifier and TypeMethodDescriptionMap an S-expression double value to an objectMap an S-expression int to an objectMap an S-expression list to an objectMap an S-expression string to an objectmapSymbol(SexprSymbol symbol) Map an S-expression symbol to an objectmapSymbolToClass(SexprSymbol symbol) Map an S-expression symbol to a class
-
Method Details
-
mapSymbol
Map an S-expression symbol to an object- Parameters:
symbol- The symbol to map- Returns:
- The value the symbol maps to
- Throws:
MappingException- If there is an error performing the mapping
-
mapSymbolToClass
Map an S-expression symbol to a class- Parameters:
symbol- The symbol to map- Returns:
- The class the symbol maps to
- Throws:
MappingException- If there is an error performing the mapping
-
mapDouble
Map an S-expression double value to an object- Parameters:
d- The double value to map- Returns:
- The object the value maps to
- Throws:
MappingException- If there is an error performing the mapping
-
mapInt
Map an S-expression int to an object- Parameters:
i- The S-expression int that should be mapped- Returns:
- The object the int maps to
- Throws:
MappingException- If there is an error performing the mapping
-
mapString
Map an S-expression string to an object- Parameters:
s- The string to map- Returns:
- The object the string maps to
- Throws:
MappingException- If there is an error performing the mapping
-
mapList
Map an S-expression list to an object- Parameters:
l- The list to maptargetClass- The class that the object is expected to map to- Returns:
- The object that the list has been mapped into
- Throws:
MappingException- If there is an error performing the mapping
-