@Test(expected = IndexOutOfBoundsException.class) public void testEval_EndOverflow() { fn.eval(keyword, textSource, bufferStart, bufferEnd + 1); }
@Override public double eval(final IKeyword<S> keyword_, final ITextSource<S> textSource_, final long start_, final long end_) { Verify.notNull(keyword_, PARM_keyword); Verify.notNull(textSource_, PARM_textSource); Verify.condition(start_ <= end_, MSG_MATCH_RANGE_MUST_BE_VALID); Verify.condition(textSource_.isOpen(), MSG_TEXT_SOURCE_MUST_BE_OPEN); final ITailBuffer<S> buffer = textSource_.getTailBuffer(); final long bufferStart = buffer.start(); final long bufferEnd = buffer.end(); Verify.inClosedRange(start_, bufferStart, bufferEnd, PARM_start); Verify.inClosedRange(end_, bufferStart, bufferEnd, PARM_end); return evalImpl(keyword_, textSource_, start_, end_); }
DefaultMatchPrecisionFunction implements IMatchPrecisionFunction<S> { @Override public double eval(final IKeyword<S> keyword_, final ITextSource<S> textSource_, final long start_, final long end_) { Verify.notNull(keyword_, PARM_keyword); Verify.notNull(textSource_, PARM_textSource); Verify.condition(start_ <= end_, MSG_MATCH_RANGE_MUST_BE_VALID); Verify.condition(textSource_.isOpen(), MSG_TEXT_SOURCE_MUST_BE_OPEN); final ITailBuffer<S> buffer = textSource_.getTailBuffer(); final long bufferStart = buffer.start(); final long bufferEnd = buffer.end(); Verify.inClosedRange(start_, bufferStart, bufferEnd, PARM_start); Verify.inClosedRange(end_, bufferStart, bufferEnd, PARM_end); return evalImpl(keyword_, textSource_, start_, end_); } }
DefaultMatchPrecisionFunction implements IMatchPrecisionFunction<S> { @Override public double eval(final IKeyword<S> keyword_, final ITextSource<S> textSource_, final long start_, final long end_) { Verify.notNull(keyword_, PARM_keyword); Verify.notNull(textSource_, PARM_textSource); Verify.condition(start_ <= end_, MSG_MATCH_RANGE_MUST_BE_VALID); Verify.condition(textSource_.isOpen(), MSG_TEXT_SOURCE_MUST_BE_OPEN); final ITailBuffer<S> buffer = textSource_.getTailBuffer(); final long bufferStart = buffer.start(); final long bufferEnd = buffer.end(); Verify.inClosedRange(start_, bufferStart, bufferEnd, PARM_start); Verify.inClosedRange(end_, bufferStart, bufferEnd, PARM_end); return evalImpl(keyword_, textSource_, start_, end_); }  }
DefaultMatchPrecisionFunction implements IMatchPrecisionFunction<S> { @Override public double eval(final IKeyword<S> keyword_, final ITextSource<S> textSource_, final long start_, final long end_) { Verify.notNull(keyword_, PARM_keyword); Verify.notNull(textSource_, PARM_textSource); Verify.condition(start_ <= end_, MSG_MATCH_RANGE_MUST_BE_VALID); Verify.condition(textSource_.isOpen(), MSG_TEXT_SOURCE_MUST_BE_OPEN); final ITailBuffer<S> buffer = textSource_.getTailBuffer(); final long bufferStart = buffer.start(); final long bufferEnd = buffer.end(); Verify.inClosedRange(start_, bufferStart, bufferEnd, PARM_start); Verify.inClosedRange(end_, bufferStart, bufferEnd, PARM_end); return evalImpl(keyword_, textSource_, start_, end_); }  @Override double eval(final IKeyword<S> keyword_, final ITextSource<S> textSource_, final long start_, final long end_); }
DefaultMatchPrecisionFunction implements IMatchPrecisionFunction<S> { @Override public double eval(final IKeyword<S> keyword_, final ITextSource<S> textSource_, final long start_, final long end_) { Verify.notNull(keyword_, PARM_keyword); Verify.notNull(textSource_, PARM_textSource); Verify.condition(start_ <= end_, MSG_MATCH_RANGE_MUST_BE_VALID); Verify.condition(textSource_.isOpen(), MSG_TEXT_SOURCE_MUST_BE_OPEN); final ITailBuffer<S> buffer = textSource_.getTailBuffer(); final long bufferStart = buffer.start(); final long bufferEnd = buffer.end(); Verify.inClosedRange(start_, bufferStart, bufferEnd, PARM_start); Verify.inClosedRange(end_, bufferStart, bufferEnd, PARM_end); return evalImpl(keyword_, textSource_, start_, end_); }  @Override double eval(final IKeyword<S> keyword_, final ITextSource<S> textSource_, final long start_, final long end_);  }