Class Example

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

public class Example extends Object implements DescriptionAccessor
An example usage item describing a usage scenario.
  • 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 DescriptionAccessor
    • getOperands

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