Class InvertFilter

  • All Implemented Interfaces:
    SamRecordFilter

    public class InvertFilter
    extends Object
    implements SamRecordFilter
    Wraps an existing filter and inverts it. If the wrapped filter would have filtered something out this will keep it and vice versa.
    • Constructor Detail

      • InvertFilter

        public InvertFilter​(SamRecordFilter filter)
        Constructor
        Parameters:
        filter - the filter that this Filter inverts
    • Method Detail

      • filterOut

        public boolean filterOut​(SAMRecord record)
        Determines whether a SAMRecord matches this filter
        Specified by:
        filterOut in interface SamRecordFilter
        Parameters:
        record - the SAMRecord to evaluate
        Returns:
        inverts the result from filter
      • filterOut

        public boolean filterOut​(SAMRecord first,
                                 SAMRecord second)
        Determines whether a pair of SAMRecord matches this filter
        Specified by:
        filterOut in interface SamRecordFilter
        Parameters:
        first - the first SAMRecord to evaluate
        second - the second SAMRecord to evaluate
        Returns:
        inverts the result from filter