net.dpml.cli.option
Class HelpLineImpl
java.lang.Object
net.dpml.cli.option.HelpLineImpl
- All Implemented Interfaces:
- HelpLine
- public class HelpLineImpl
- extends Object
- implements HelpLine
Represents a line in the help screen.
- Version:
- 1.0.0
- Author:
- Digital Product Meta Library
Constructor Summary |
HelpLineImpl(Option option,
int indent)
Creates a new HelpLineImpl to represent a particular Option in the online
help. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 describesindent
- the level of indentation for this line
getDescription
public String getDescription()
- Specified by:
getDescription
in interface HelpLine
- Returns:
- The description of the option
getIndent
public int getIndent()
- Specified by:
getIndent
in interface HelpLine
- Returns:
- The level of indentation for this line
getOption
public Option getOption()
- Specified by:
getOption
in interface HelpLine
- 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.
- Specified by:
usage
in interface HelpLine
- Parameters:
helpSettings
- the settings to applycomparator
- a comparator to sort options when applicable
- Returns:
- the usage string