net.dpml.cli.option

Class HelpLineImpl

public class HelpLineImpl extends Object implements HelpLine

Represents a line in the help screen.

Version: @PROJECT-VERSION@

Author: @PUBLISHER-NAME@

Constructor Summary
HelpLineImpl(Option option, int indent)
Creates a new HelpLineImpl to represent a particular Option in the online help.
Method Summary
StringgetDescription()
intgetIndent()
OptiongetOption()
Stringusage(Set helpSettings, Comparator comparator)
Builds a usage string for the option using the specified settings and comparator.

Constructor Detail

HelpLineImpl

public HelpLineImpl(Option option, int indent)
Creates a new HelpLineImpl to represent a particular Option in the online help.

Parameters: option the Option that the HelpLineImpl describes indent the level of indentation for this line

Method Detail

getDescription

public String getDescription()

Returns: The description of the option

getIndent

public int getIndent()

Returns: The level of indentation for this line

getOption

public Option getOption()

Returns: The Option that the help line relates to

usage

public String usage(Set helpSettings, Comparator comparator)
Builds a usage string for the option using the specified settings and comparator.

Parameters: helpSettings the settings to apply comparator a comparator to sort options when applicable

Returns: the usage string