# Class FilterHelpAppendable

java.lang.Object
org.apache.commons.cli.help.FilterHelpAppendable

All Implemented Interfaces:
  `Appendable, HelpAppendable`

Direct Known Subclasses:
  `TextHelpAppendable`

public abstract class FilterHelpAppendable extends Object implements HelpAppendable
An abstract implementation of `HelpAppendable` that writes output to an `Appendable` instance.

This class is the superclass of all classes that filter help appendables. These appendable sit on top of an existing appendable (the underlying appendable) which it uses as its basic sink of data, but possibly transforming the data along the way or providing additional functionality.

The class `FilterHelpAppendable` itself simply overrides all methods of `HelpAppendable` with versions that pass all requests to the underlying appendable. Subclasses of `FilterHelpAppendable` may further override some of these methods as well as provide additional methods and fields.

Implementation Note: This class is similar to FilterOutputStream in relation to OutputStream. We could further split FilterHelpAppendable into a FilterAppendable but that seems like YAGNI.

Since:
  1.10.0

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final Appendable`
  `output`
  The underlying appendable to be filtered.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `FilterHelpAppendable(Appendable output)`
  Constructs an appendable filter built on top of the specified underlying appendable.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `FilterHelpAppendable`
  `append(char ch)`
  `FilterHelpAppendable`
  `append(CharSequence text)`
  `FilterHelpAppendable`
  `append(CharSequence csq, int start, int end)`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface HelpAppendable

  `appendFormat, appendHeader, appendList, appendParagraph, appendParagraphFormat, appendTable, appendTitle`

- ## Field Details

  - ### output

    protected final Appendable output
    The underlying appendable to be filtered.

- ## Constructor Details

  - ### FilterHelpAppendable

    protected FilterHelpAppendable(Appendable output)
    Constructs an appendable filter built on top of the specified underlying appendable.
    Parameters:
      `output` - the underlying appendable to be assigned to the field `this.output` for later use, or `null` if this instance is to be created without an underlying stream.

- ## Method Details

  - ### append

    public FilterHelpAppendable append(char ch) throws IOException
    Specified by:
      `append` in interface `Appendable`
    Throws:
      `IOException`

  - ### append

    public FilterHelpAppendable append(CharSequence text) throws IOException
    Specified by:
      `append` in interface `Appendable`
    Throws:
      `IOException`

  - ### append

    public FilterHelpAppendable append(CharSequence csq, int start, int end) throws IOException
    Specified by:
      `append` in interface `Appendable`
    Throws:
      `IOException`