Class InputCommandCreate

java.lang.Object
com.iohao.net.extension.client.InputCommandCreate

public class InputCommandCreate extends Object
Helper for creating simulated input commands within a module command region.
Author:
渔民小镇
date:
2023-07-09
  • Field Details

    • cmd

      public int cmd
    • uniqueInputCommand

      public boolean uniqueInputCommand
      When true, only one InputCommand can exist for the same route.
    • cmdName

      public String cmdName
      Prefix used in the module command description.
    • clientUserInputCommands

      public ClientUserInputCommands clientUserInputCommands
  • Constructor Details

    • InputCommandCreate

      public InputCommandCreate()
  • Method Details

    • ofCmdInfo

      public CmdInfo ofCmdInfo(int subCmd)
    • getInputCommand

      public InputCommand getInputCommand(int subCmd)
    • ofInputCommand

      public InputCommand ofInputCommand(int subCmd)
      Creates a simulated command.
      Parameters:
      subCmd - sub-command route
      Returns:
      InputCommand
    • ofInputCommandLong

      public InputCommand ofInputCommandLong(int subCmd)
      Creates a simulated command that reads a long request parameter from the console.
      Parameters:
      subCmd - sub-command route
      Returns:
      InputCommand
    • ofInputCommandUserId

      public InputCommand ofInputCommandUserId(int subCmd)
      Creates a simulated command that reads a target userId (long) from the console.
      Parameters:
      subCmd - sub-command route
      Returns:
      InputCommand
    • nextParamLong

      public RequestDataDelegate nextParamLong(String paramTips)
    • ofInputCommandInt

      public InputCommand ofInputCommandInt(int subCmd)
    • nextParamInt

      public RequestDataDelegate nextParamInt(String paramTips)
    • ofInputCommandString

      public InputCommand ofInputCommandString(int subCmd)
    • nextParamString

      public RequestDataDelegate nextParamString(String paramTips)
    • setCmd

      public void setCmd(int cmd)
    • setUniqueInputCommand

      public void setUniqueInputCommand(boolean uniqueInputCommand)
      When true, only one InputCommand can exist for the same route.
    • setCmdName

      public void setCmdName(String cmdName)
      Prefix used in the module command description.
    • setClientUserInputCommands

      public void setClientUserInputCommands(ClientUserInputCommands clientUserInputCommands)
    • getCmd

      public int getCmd()
    • isUniqueInputCommand

      public boolean isUniqueInputCommand()
      When true, only one InputCommand can exist for the same route.
    • getCmdName

      public String getCmdName()
      Prefix used in the module command description.
    • getClientUserInputCommands

      public ClientUserInputCommands getClientUserInputCommands()