## org.biojava.bio.program.gff
Class GFFFilterer

    java.lang.Object
      |
      +--org.biojava.bio.program.gff.GFFFilterer

public class GFFFilterer
extends java.lang.Object
implements GFFDocumentHandler

An object that filters a stream of GFF, forwarding some GFFRecords to a listening GFFDocumentHandler, and dropping others.

The choice to forward or drop is made by a GFFRecordFilter.

Unless otherwise stated, all methods forward to the listening handler without altering the arguments in any way.

Author:
  Matthew Pocock

Constructor Summary
`GFFFilterer(GFFDocumentHandler handler, GFFRecordFilter filter)` Create a new GFFFilterer that will forward to handler everything that filter accepts.

Method Summary
`void` `commentLine(java.lang.String comment)` A comment line has been encountered.
`void` `endDocument()` Indicates that the current GFF document has now ended.
`void` `recordLine(GFFRecord record)` Only forward the GFFRecords that match a filter.
`void` `startDocument(java.lang.String locator)` Indicates that a new GFF document has been started.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### GFFFilterer

    public GFFFilterer(GFFDocumentHandler handler,
                       GFFRecordFilter filter)

  Create a new GFFFilterer that will forward to handler everything that filter accepts.
  Parameters:
    `handler` - the listening GFFDocumentHandler
    `filter` - the GFFRecordFilter that decides what is forwarded to handler

Method Detail

### startDocument

    public void startDocument(java.lang.String locator)

  Description copied from interface: GFFDocumentHandler
  Indicates that a new GFF document has been started. This gives you a hook to set up per-document resources.
  Specified by:
    startDocument in interface GFFDocumentHandler
  Tags copied from interface: GFFDocumentHandler
  Parameters:
    `locator` - A URI for the stream being parsed.

### endDocument

    public void endDocument()

  Description copied from interface: GFFDocumentHandler
  Indicates that the current GFF document has now ended.

  This gives you the chance to flush results, or do calculations if you wish.

  Specified by:
    endDocument in interface GFFDocumentHandler

### commentLine

    public void commentLine(java.lang.String comment)

  Description copied from interface: GFFDocumentHandler
  A comment line has been encountered.

  comment has already had the leading '`#`' removed, and may have had leading-and-trailing whitespace trimmed.

  Specified by:
    commentLine in interface GFFDocumentHandler
  Tags copied from interface: GFFDocumentHandler
  Parameters:
    `comment` - the comment String

### recordLine

    public void recordLine(GFFRecord record)

  Only forward the GFFRecords that match a filter.
  Specified by:
    recordLine in interface GFFDocumentHandler
  Tags copied from interface: GFFDocumentHandler
  Parameters:
    `record` - the GFFRecord containing all the info