@SPI
public final class Commands
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static io.spine.base.CommandMessage |
ensureMessage(com.google.protobuf.Message commandOrMessage)
Extracts a command message if the passed instance is a
Command object or
Any , otherwise returns the passed message. |
static io.spine.string.Stringifier<io.spine.core.CommandId> |
idStringifier()
Obtains stringifier for command IDs.
|
static void |
sort(java.util.List<io.spine.core.Command> commands)
Sorts the command given command request list by command timestamp value.
|
public static io.spine.base.CommandMessage ensureMessage(com.google.protobuf.Message commandOrMessage)
Command
object or
Any
, otherwise returns the passed message.public static void sort(java.util.List<io.spine.core.Command> commands)
commands
- the command list to sortpublic static io.spine.string.Stringifier<io.spine.core.CommandId> idStringifier()