public boolean isNewFragment() {position += posIncAtt.getPositionIncrement();if (waitForPos <= position) {waitForPos = -1;} else if (waitForPos != -1) {return false;}WeightedSpanTerm wSpanTerm = queryScorer.getWeightedSpanTerm(termAtt.toString());if (wSpanTerm != null) {List<PositionSpan> positionSpans = wSpanTerm.getPositionSpans();for (PositionSpan positionSpan : positionSpans) {if (positionSpan.start == position) {waitForPos = positionSpan.end + 1;break;}}}boolean isNewFrag = offsetAtt.endOffset() >= (fragmentSize * currentNumFrags)&& (textSize - offsetAtt.endOffset()) >= (fragmentSize >>> 1);if (isNewFrag) {currentNumFrags++;}return isNewFrag;}
public virtual bool IsNewFragment(){position += posIncAtt.PositionIncrement;if (waitForPos == position){waitForPos = -1;}else if (waitForPos != -1){return false;}WeightedSpanTerm wSpanTerm = queryScorer.GetWeightedSpanTerm(termAtt.ToString());if (wSpanTerm != null){IList<PositionSpan> positionSpans = wSpanTerm.PositionSpans;for (int i = 0; i < positionSpans.Count; i++){if (positionSpans[i].Start == position){waitForPos = positionSpans[i].End + 1;break;}}}bool isNewFrag = offsetAtt.EndOffset >= (fragmentSize * currentNumFrags)&& (textSize - offsetAtt.EndOffset) >= (int)((uint)fragmentSize >> 1);if (isNewFrag){currentNumFrags++;}return isNewFrag;}