Class ArgumentDescription


  • public class ArgumentDescription
    extends java.lang.Object
    Describes a command argument with a name and optional description.
    Since:
    4.0
    See Also:
    CommandDescription
    • Constructor Summary

      Constructors 
      Constructor Description
      ArgumentDescription​(java.lang.String name)
      Creates a new argument description with the specified name and an empty description.
      ArgumentDescription​(java.lang.String name, java.util.List<AttributedString> description)
      Creates a new argument description with the specified name and description.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<AttributedString> description()
      Returns the argument description lines.
      java.lang.String name()
      Returns the argument name.
      static java.util.List<ArgumentDescription> of​(java.lang.String... names)
      Creates a list of argument descriptions from names.
      • Methods inherited from class java.lang.Object

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

      • ArgumentDescription

        public ArgumentDescription​(java.lang.String name)
        Creates a new argument description with the specified name and an empty description.
        Parameters:
        name - the argument name
        Throws:
        java.lang.IllegalArgumentException - if the name contains spaces or tabs
      • ArgumentDescription

        public ArgumentDescription​(java.lang.String name,
                                   java.util.List<AttributedString> description)
        Creates a new argument description with the specified name and description.
        Parameters:
        name - the argument name
        description - the description lines
        Throws:
        java.lang.IllegalArgumentException - if the name contains spaces or tabs
    • Method Detail

      • name

        public java.lang.String name()
        Returns the argument name.
        Returns:
        the name
      • description

        public java.util.List<AttributedString> description()
        Returns the argument description lines.
        Returns:
        the description, never null
      • of

        public static java.util.List<ArgumentDescription> of​(java.lang.String... names)
        Creates a list of argument descriptions from names. Each description will have an empty description list.
        Parameters:
        names - the argument names
        Returns:
        a list of argument descriptions