Module com.github.rvesse.airline
Class BasicHint
- java.lang.Object
-
- com.github.rvesse.airline.help.sections.common.BasicHint
-
- All Implemented Interfaces:
HelpHint
- Direct Known Subclasses:
BasicSection
public class BasicHint extends java.lang.Object implements HelpHint
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.String[]>
blocks
private HelpFormat
format
private java.lang.String
preamble
-
Constructor Summary
Constructors Constructor Description BasicHint(java.lang.String preamble, HelpFormat format, java.lang.String[]... blocks)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]
getContentBlock(int blockNumber)
Gets the content block with the given numberHelpFormat
getFormat()
Gets the format of the provided help informationjava.lang.String
getPreamble()
Gets the preamble text that should be includedint
numContentBlocks()
Gets the number of content blocks provided
-
-
-
Field Detail
-
preamble
private final java.lang.String preamble
-
format
private final HelpFormat format
-
blocks
private java.util.List<java.lang.String[]> blocks
-
-
Constructor Detail
-
BasicHint
public BasicHint(java.lang.String preamble, HelpFormat format, java.lang.String[]... blocks)
-
-
Method Detail
-
getPreamble
public java.lang.String getPreamble()
Description copied from interface:HelpHint
Gets the preamble text that should be included- Specified by:
getPreamble
in interfaceHelpHint
- Returns:
- Preamble text
-
getFormat
public HelpFormat getFormat()
Description copied from interface:HelpHint
Gets the format of the provided help information
-
numContentBlocks
public int numContentBlocks()
Description copied from interface:HelpHint
Gets the number of content blocks providedHelp generators should consult the
HelpHint.getFormat()
return value to determine how to format the content blocks but they are not required to do so- Specified by:
numContentBlocks
in interfaceHelpHint
- Returns:
- Number of content blocks
-
getContentBlock
public java.lang.String[] getContentBlock(int blockNumber)
Description copied from interface:HelpHint
Gets the content block with the given number- Specified by:
getContentBlock
in interfaceHelpHint
- Parameters:
blockNumber
- Block number- Returns:
- Content Block
-
-