@Test public void testExpandRange() { mRange = new Range(0, mSpy); mRange.extendRange(5, TYPE_PRIMARY); mRange.extendRange(10, TYPE_PRIMARY); mOperations.pop().assertChanged(6, 10, true); }
void extendRange(int position, @RangeType int type) { checkArgument(position != NO_POSITION, "Position cannot be NO_POSITION."); if (mEnd == NO_POSITION || mEnd == mBegin) { mEnd = NO_POSITION; establishRange(position, type); } else { reviseRange(position, type); } }
Range { void extendRange(int position, @RangeType int type) { checkArgument(position != NO_POSITION, "Position cannot be NO_POSITION."); if (mEnd == NO_POSITION || mEnd == mBegin) { mEnd = NO_POSITION; establishRange(position, type); } else { reviseRange(position, type); } } }
Range { void extendRange(int position, @RangeType int type) { checkArgument(position != NO_POSITION, "Position cannot be NO_POSITION."); if (mEnd == NO_POSITION || mEnd == mBegin) { mEnd = NO_POSITION; establishRange(position, type); } else { reviseRange(position, type); } } Range(int position, @NonNull Callbacks callbacks); }
Range { void extendRange(int position, @RangeType int type) { checkArgument(position != NO_POSITION, "Position cannot be NO_POSITION."); if (mEnd == NO_POSITION || mEnd == mBegin) { mEnd = NO_POSITION; establishRange(position, type); } else { reviseRange(position, type); } } Range(int position, @NonNull Callbacks callbacks); @Override String toString(); }
Range { void extendRange(int position, @RangeType int type) { checkArgument(position != NO_POSITION, "Position cannot be NO_POSITION."); if (mEnd == NO_POSITION || mEnd == mBegin) { mEnd = NO_POSITION; establishRange(position, type); } else { reviseRange(position, type); } } Range(int position, @NonNull Callbacks callbacks); @Override String toString();  }