case class MainParameter(description: String, arity: Int, required: Boolean = false, defaults: Option[Seq[String]] = None) extends Parameter[String] with MultipleValues[String] with Product with Serializable
A main parameter has a number of values specified by its arity
.
The values can be retrieved as a sequence by the values
option.
A main parameter is different from a list parameter by the absence of a name
in the command line. There is, however, an internal name
(MainParameter.internalName
) that can be used in the command line to avoid
ambiguities.
Main-parameter values can be given at the beginning or at the end of the arguments sequence (or both mixed up, but that may be confusing). Beware, that values at the end might be consumed by a variable-arity parameter in a position right before.
- Alphabetic
- By Inheritance
- MainParameter
- Serializable
- Product
- Equals
- MultipleValues
- Parameter
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val arity: Int
Specification of values following this parameter name:
Specification of values following this parameter name:
- positive number: exactly this number of values must follow this parameter name
- negative number: at least abs(this number) of values must follow this parameter name (variable arity)
- zero: no values must follow this parameter name
Values following this parameter name will be consumed up to the next parameter.
- Definition Classes
- MainParameter → Parameter
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- val defaults: Option[Seq[String]]
- Definition Classes
- MainParameter → MultipleValues
- val description: String
- Definition Classes
- MainParameter → Parameter
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val hidden: Boolean
- Definition Classes
- Parameter
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val names: Set[String]
- Definition Classes
- MainParameter → Parameter
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val required: Boolean
- Definition Classes
- MainParameter → Parameter
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def usage(namesColWidth: Int = 0): String
A usage message of this parameter in a two-column layout.
A usage message of this parameter in a two-column layout.
The first column shows the names in one line, the second column shows one ore more lines of description. The lines of the description are taken as given, no automatic word wrap is done.
- namesColWidth
minimum width of the names column (defaults to 0)
- returns
the usage message
- Definition Classes
- Parameter
- def values: Option[Seq[String]]
- Definition Classes
- MultipleValues
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])