org.crosswire.jsword.book.filter

## Class SourceFilterFactory

- java.lang.Object
- - org.crosswire.jsword.book.filter.SourceFilterFactory

-     public final class SourceFilterFactory
      extends Object

  A simple container for all the known SourceFilters.
  Author:
    Joe Walker
  See Also:
    `The GNU Lesser General Public License for details.`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private static SourceFilter` | `deft` The lookup table of filters
    `private static Map<String,SourceFilter>` | `filters` The lookup table of filters
    `private static org.slf4j.Logger` | `log` The log stream

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `private` | `SourceFilterFactory()` Prevent instantiation

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `addFilter(String name, SourceFilter instance)` Add to our list of known filters
    `static SourceFilter` | `getDefaultFilter()` Find a filter given a lookup string
    `static SourceFilter` | `getFilter(String lookup)` Find a filter given a lookup string.

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### filters

          private static Map<String,SourceFilter> filters

      The lookup table of filters

    - #### log

          private static final org.slf4j.Logger log

      The log stream

    - #### deft

          private static volatile SourceFilter deft

      The lookup table of filters

  - ### Constructor Detail

    - #### SourceFilterFactory

          private SourceFilterFactory()

      Prevent instantiation

  - ### Method Detail

    - #### getFilter

          public static SourceFilter getFilter(String lookup)

      Find a filter given a lookup string. If lookup is null or the filter is not found then the default filter will be used.
      Parameters:
        `lookup` - the lookup string for the filter
      Returns:
        the matching filter

    - #### getDefaultFilter

          public static SourceFilter getDefaultFilter()

      Find a filter given a lookup string
      Returns:
        the default filter

    - #### addFilter

          public static void addFilter(String name,
                       SourceFilter instance)

      Add to our list of known filters
      Parameters:
        `name` -
        `instance` -