org.crosswire.jsword.book.sword

## Class SwordBookMetaData.KeyFilter

- java.lang.Object
- - org.crosswire.jsword.book.sword.SwordBookMetaData.KeyFilter

- All Implemented Interfaces:
    Filter<String>
  Enclosing class:
    SwordBookMetaData

      private static final class SwordBookMetaData.KeyFilter
      extends Object
      implements Filter<String>

  KeyFilter returns true for keys that should always be present. A partially loaded SwordBookMetaData will satisfy this filter.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private Set` | `keepers`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SwordBookMetaData.KeyFilter(String[] keepers)` Create a KeyFilter for the expected keys.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `test(String key)` Does this given object pass the test implemented by this filter

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

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

- - ### Field Detail

    - #### keepers

          private Set keepers

  - ### Constructor Detail

    - #### SwordBookMetaData.KeyFilter

          SwordBookMetaData.KeyFilter(String[] keepers)

      Create a KeyFilter for the expected keys.
      Parameters:
        `keepers` - the list of keys that should be retained

  - ### Method Detail

    - #### test

          public boolean test(String key)

      Description copied from interface: `Filter`
      Does this given object pass the test implemented by this filter
      Specified by:
        `test` in interface `Filter<String>`
      Parameters:
        `key` - The object to test
      Returns:
        boolean true if it passes, false otherwise