# Class BasicFilter

java.lang.Object
uk.ac.starlink.ttools.filter.BasicFilter

All Implemented Interfaces:
  `ProcessingFilter`

Direct Known Subclasses:
  `AddColumnFilter, AddSkyCoordsFilter, AssertFilter, BadValueFilter, CacheFilter, CheckFilter, ClearParameterFilter, CollapseColsFilter, ColumnCalculatorFilter, ColumnMetadataFilter, ConstFilter, DeleteColumnFilter, EveryFilter, ExplodeAllFilter, ExplodeColsFilter, FixNamesFilter, GroupFilter, HeadFilter, HealpixMetadataFilter, KeepColumnFilter, MetadataFilter, NameFilter, PixSampleFilter, ProgressFilter, RandomFilter, RandomViewFilter, RangeFilter, RepeatFilter, ReplaceColumnFilter, ReplaceValueFilter, ResolverFilter, SelectFilter, SequentialViewFilter, SetParameterFilter, ShuffleFilter, SortFilter, SortHeadFilter, StatsFilter, TailFilter, TransposeFilter, UniqueFilter`

public abstract class BasicFilter extends Object implements ProcessingFilter
Basic implementation of ProcessingFilter methods. Utility superclass for implementing concrete ProcessingFilter.

Since:
  9 Aug 2005
Author:
  Mark Taylor

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`BasicFilter(String name, String usage)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`static String`
`explainSyntax(String[] usages)`
Returns a snippet of XML explaining use of the syntax of some given usage-type example arguments.
`String`
`getDescription()`
Description for this filter.
`protected abstract String[]`
`getDescriptionLines()`
`String`
`getName()`
`String`
`getUsage()`
Usage message for this filter.

### Methods inherited from class Object

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

### Methods inherited from interface ProcessingFilter

`createStep`

## Constructor Details

### BasicFilter

protected BasicFilter(String name, String usage)
Constructor.

Parameters:
  `name` - filter name
  `usage` - filter usage

## Method Details

### getName

public String getName()

### getUsage

public String getUsage()
Description copied from interface: `ProcessingFilter`
Usage message for this filter. This should contain any arguments which apply to this item; the name itself should not be included. May contain newline characters to break up a long line.

Specified by:
  `getUsage` in interface `ProcessingFilter`
Returns:
  usage string

### getDescription

public String getDescription()
Description copied from interface: `ProcessingFilter`
Description for this filter. This is currently inserted into the user document, so should be in XML format.

Specified by:
  `getDescription` in interface `ProcessingFilter`
Returns:
  textual description of this filter

### getDescriptionLines

protected abstract String[] getDescriptionLines()

### explainSyntax

public static String explainSyntax(String[] usages)
Returns a snippet of XML explaining use of the syntax of some given usage-type example arguments. These may be one of the following:

- expr
- col-id
- colid-list

either alone or with some other text pre- or ap-pended.

Parameters:
  `usages` - array of formal arguments to be explained
Returns:
  XML explanation