- Type Parameters:
AI- abstract input symbol type.AO- abstract output symbol type.CI- concrete input symbol type.CO- concrete output symbol type.
- All Known Subinterfaces:
Mapper.AsynchronousMapper<AI,,AO, CI, CO> Mapper.SynchronousMapper<AI,,AO, CI, CO> SULMapper<AI,AO, CI, CO>
- All Known Implementing Classes:
SimplePOJOExceptionMapper,StringMapper
public interface Mapper<AI,AO,CI,CO>
A mapper that lifts a
SUL or MembershipOracle from an "abstract" to a "concrete" level.
The notion of "abstract" and "concrete" is not universally defined, and mostly depends on the chosen perspective.
Generally speaking, the point of a Mapper<AI,AO,CI,CO> is to translate a SUL<CI,CO> into a
SUL<AI,AO>, and additionally provide facilities to map exceptions occurring at the concrete level to symbols at the
abstract level.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA mapper refinement to establish the contract of an asynchronous, query-wise translation of input words.static interfaceA mapper refinement to establish the contract of a synchronized, symbol-wise translation of input words for reactive systems. -
Method Summary
Modifier and TypeMethodDescriptionMethod that maps an abstract input to a corresponding concrete input.Method that maps a concrete output to a corresponding abstract output.default voidpost()Method that is invoked after all translation steps on a word are performed.default voidpre()Method that is invoked before any translation steps on a word are performed.
-
Method Details
-
pre
default void pre()Method that is invoked before any translation steps on a word are performed. Usually left un-implemented for stateless mappers. -
post
default void post()Method that is invoked after all translation steps on a word are performed. Usually left un-implemented for stateless mappers. -
mapInput
Method that maps an abstract input to a corresponding concrete input.- Parameters:
abstractInput- the abstract input- Returns:
- the concrete input
-
mapOutput
Method that maps a concrete output to a corresponding abstract output.- Parameters:
concreteOutput- the concrete output- Returns:
- the abstract output
-