Class InputCommandCreate
java.lang.Object
com.iohao.net.extension.client.InputCommandCreate
Helper for creating simulated input commands within a module command region.
- Author:
- 渔民小镇
- date:
- 2023-07-09
-
Field Summary
FieldsModifier and TypeFieldDescriptionintPrefix used in the module command description.booleanWhen true, only oneInputCommandcan exist for the same route. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetCmd()Prefix used in the module command description.getInputCommand(int subCmd) booleanWhen true, only oneInputCommandcan exist for the same route.nextParamInt(String paramTips) nextParamLong(String paramTips) nextParamString(String paramTips) ofCmdInfo(int subCmd) ofInputCommand(int subCmd) Creates a simulated command.ofInputCommandInt(int subCmd) ofInputCommandLong(int subCmd) Creates a simulated command that reads alongrequest parameter from the console.ofInputCommandString(int subCmd) ofInputCommandUserId(int subCmd) Creates a simulated command that reads a target userId (long) from the console.voidsetClientUserInputCommands(ClientUserInputCommands clientUserInputCommands) voidsetCmd(int cmd) voidsetCmdName(String cmdName) Prefix used in the module command description.voidsetUniqueInputCommand(boolean uniqueInputCommand) When true, only oneInputCommandcan exist for the same route.
-
Field Details
-
cmd
public int cmd -
uniqueInputCommand
public boolean uniqueInputCommandWhen true, only oneInputCommandcan exist for the same route. -
cmdName
Prefix used in the module command description. -
clientUserInputCommands
-
-
Constructor Details
-
InputCommandCreate
public InputCommandCreate()
-
-
Method Details
-
ofCmdInfo
-
getInputCommand
-
ofInputCommand
Creates a simulated command.- Parameters:
subCmd- sub-command route- Returns:
- InputCommand
-
ofInputCommandLong
Creates a simulated command that reads alongrequest parameter from the console.- Parameters:
subCmd- sub-command route- Returns:
- InputCommand
-
ofInputCommandUserId
Creates a simulated command that reads a target userId (long) from the console.- Parameters:
subCmd- sub-command route- Returns:
- InputCommand
-
nextParamLong
-
ofInputCommandInt
-
nextParamInt
-
ofInputCommandString
-
nextParamString
-
setCmd
public void setCmd(int cmd) -
setUniqueInputCommand
public void setUniqueInputCommand(boolean uniqueInputCommand) When true, only oneInputCommandcan exist for the same route. -
setCmdName
Prefix used in the module command description. -
setClientUserInputCommands
-
getCmd
public int getCmd() -
isUniqueInputCommand
public boolean isUniqueInputCommand()When true, only oneInputCommandcan exist for the same route. -
getCmdName
Prefix used in the module command description. -
getClientUserInputCommands
-