Class ExampleUsage

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

public class ExampleUsage
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
    ExampleUsage​(String aDescription, Operand<?>... aOperands)
    Constructs an example usage.
  • Method Summary

    Modifier and Type Method Description
    String getDescription()
    Operand<?>[] getOperands()
    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

    • ExampleUsage

      public ExampleUsage​(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.