Class/Object

de.h2b.scala.lib.util.cli

MainParameter

Related Docs: object MainParameter | package cli

Permalink

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.

Linear Supertypes
Serializable, Serializable, Product, Equals, MultipleValues[String], Parameter[String], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MainParameter
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. MultipleValues
  7. Parameter
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MainParameter(description: String, arity: Int, required: Boolean = false, defaults: Option[Seq[String]] = None)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val arity: Int

    Permalink

    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
    MainParameterParameter
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  7. val defaults: Option[Seq[String]]

    Permalink
    Definition Classes
    MainParameterMultipleValues
  8. val description: String

    Permalink
    Definition Classes
    MainParameterParameter
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  11. val hidden: Boolean

    Permalink
    Definition Classes
    Parameter
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. val names: Set[String]

    Permalink
    Definition Classes
    MainParameterParameter
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  17. val required: Boolean

    Permalink
    Definition Classes
    MainParameterParameter
  18. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  19. def usage(namesColWidth: Int = 0): String

    Permalink

    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
  20. def values: Option[Seq[String]]

    Permalink
    Definition Classes
    MultipleValues
  21. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from MultipleValues[String]

Inherited from Parameter[String]

Inherited from AnyRef

Inherited from Any

Ungrouped