public class CommandTypeMappingRegistry
Responsible for providing mapping between class CommandType
and interface Command
class CommandType
,
interface Command
Modifier and Type | Class and Description |
---|---|
static class |
CommandTypeMappingRegistry.Companion |
Modifier and Type | Field and Description |
---|---|
static CommandTypeMappingRegistry.Companion |
Companion |
Modifier and Type | Method and Description |
---|---|
com.tomtom.online.sdk.common.functional.Try<java.lang.Class> |
commandForValue(CommandType commandType)
Returns Try.Success when
interface Command for given class CommandType is present, otherwise returns Success.Failure
with exception UnknownCommandTypeException |
com.tomtom.online.sdk.common.functional.Try<com.tomtom.online.sdk.connectivity.core.command.CommandType> |
valueForCommand(java.lang.Class<? extends com.tomtom.online.sdk.connectivity.core.command.Command> command)
Returns Try.Success when
class CommandType for given interface Command is present, otherwise returns Success.Failure
with exception UnknownCommandException |
public static CommandTypeMappingRegistry.Companion Companion
public com.tomtom.online.sdk.common.functional.Try<com.tomtom.online.sdk.connectivity.core.command.CommandType> valueForCommand(java.lang.Class<? extends com.tomtom.online.sdk.connectivity.core.command.Command> command)
Returns Try.Success when class CommandType
for given interface Command
is present, otherwise returns Success.Failure
with exception UnknownCommandException
public com.tomtom.online.sdk.common.functional.Try<java.lang.Class> commandForValue(CommandType commandType)
Returns Try.Success when interface Command
for given class CommandType
is present, otherwise returns Success.Failure
with exception UnknownCommandTypeException