public boolean matches ( SAMRecord record ) { int myEnd = end == 0 ? Integer . MAX_VALUE : end ; switch ( readPositionConstraint ) { case OVERLAPPING : return CoordMath . overlaps ( start , myEnd , record . getAlignmentStart ( ) , record . getAlignmentEnd ( ) ) ; case CONTAINED : return CoordMath . encloses ( start , myEnd , record . getAlignmentStart ( ) , record . getAlignmentEnd ( ) ) ; case START_AT : return start == record . getAlignmentStart ( ) ; } return false ; }
Returns true iff the read specified by the record matches the interval given the interval s constraints and the read position .