Class VariableCommands

  • All Implemented Interfaces:
    CommandGroup

    public class VariableCommands
    extends java.lang.Object
    implements CommandGroup
    Built-in commands for managing session variables: set, unset, and export.

    • set ? list all session variables, or set one (set NAME=VALUE or set NAME VALUE)
    • unset NAME ? remove a session variable
    • export NAME=VALUE ? same as set NAME=VALUE
    Since:
    4.0
    • Constructor Summary

      Constructors 
      Constructor Description
      VariableCommands()
      Creates a new VariableCommands group.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Command command​(java.lang.String name)
      Finds a command by name or alias.
      java.util.List<Command> commands()
      Returns all commands in this group.
      java.lang.String name()
      Returns the name of this command group.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VariableCommands

        public VariableCommands()
        Creates a new VariableCommands group.
    • Method Detail

      • name

        public java.lang.String name()
        Description copied from interface: CommandGroup
        Returns the name of this command group.

        The default implementation returns the simple class name.

        Specified by:
        name in interface CommandGroup
        Returns:
        the group name
      • commands

        public java.util.List<Command> commands()
        Description copied from interface: CommandGroup
        Returns all commands in this group.
        Specified by:
        commands in interface CommandGroup
        Returns:
        the collection of commands, never null
      • command

        public Command command​(java.lang.String name)
        Description copied from interface: CommandGroup
        Finds a command by name or alias.

        The default implementation scans CommandGroup.commands() for a match.

        Specified by:
        command in interface CommandGroup
        Parameters:
        name - the command name or alias
        Returns:
        the command, or null if not found