/** * Delete this chunk from he given text. * * @param target * the text to delete from. */ public void applyDelete(final List<Object> target) { for (int i = last(); i >= first(); i--) { target.remove(i); } }
/** * Delete this chunk from he given text. * * @param target * the text to delete from. */ public void applyDelete(List<Object> target) { for (int i = last(); i >= first(); i--) { target.remove(i); } }
/** * Delete this chunk from he given text. * * @param target * the text to delete from. */ public void applyDelete(List target) { for (int i = last(); i >= first(); i--) { target.remove(i); } }
/** * Verifies that this chunk's saved text matches the corresponding text in the given sequence. * * @param target * the sequence to verify against. * @return true if the texts match. */ public boolean verify(final List<Object> target) { if (chunk == null) { return true; } if (last() > target.size()) { return false; } for (int i = 0; i < count; i++) { if (!target.get(anchor + i).equals(chunk.get(i))) { return false; } } return true; }
/** * Verifies that this chunk's saved text matches the corresponding text in the given sequence. * * @param target * the sequence to verify against. * @return true if the texts match. */ public boolean verify(List<Object> target) { if (chunk == null) { return true; } if (last() > target.size()) { return false; } for (int i = 0; i < count; i++) { if (!target.get(anchor + i).equals(chunk.get(i))) { return false; } } return true; }
/** * Verifies that this chunk's saved text matches the corresponding text in the given sequence. * * @param target * the sequence to verify against. * @return true if the texts match. */ public boolean verify(List target) { if (chunk == null) { return true; } if (last() > target.size()) { return false; } for (int i = 0; i < count; i++) { if (!target.get(anchor + i).equals(chunk.get(i))) { return false; } } return true; }