Class Example

java.lang.Object
org.refcodes.cli.Example
All Implemented Interfaces:
org.refcodes.mixin.DescriptionAccessor

public class Example extends Object implements org.refcodes.mixin.DescriptionAccessor
An example usage item describing a usage scenario.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.refcodes.mixin.DescriptionAccessor

    org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<B extends org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<B>>, org.refcodes.mixin.DescriptionAccessor.DescriptionMutator, org.refcodes.mixin.DescriptionAccessor.DescriptionProperty
  • Constructor Summary

    Constructors
    Constructor
    Description
    Example(String aDescription, Operand<?>... aOperands)
    Constructs an example usage.
  • Method Summary

    Modifier and Type
    Method
    Description
    Operand<?>[]
    Retrieves the command line arguments required by the example.

    Methods inherited from class java.lang.Object

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

    • Example

      public Example(String aDescription, Operand<?>... aOperands)
      Constructs an example usage.
      Parameters:
      aDescription - The example's description.
      aOperands - The command line arguments required by the example.
  • Method Details

    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface org.refcodes.mixin.DescriptionAccessor
    • getOperands

      public Operand<?>[] getOperands()
      Retrieves the command line arguments required by the example.
      Returns:
      The according command line arguments.