/** * Undo the previous create(E) operation. Note that the behavior is * undefined if the previous operation is not create(E). */ public void undoCreate(final E element, final int insertionPoint) { remove(created, insertionPoint, element); }
/** * Undo the previous delete(E) operation. Note that the behavior is * undefined if the previous operation is not delete(E). */ public void undoDelete(final E element, final UndoInfo<E> undoInfo) { final int c = undoInfo.createdInsertionPoint; if (c >= 0) { created.add(c, undoInfo.trashed); } else { remove(deleted, undoInfo.deletedInsertionPoint, element); } }
/** * Undo the previous modify(E, E) operation. Note that the behavior * is undefined if the previous operation is not modify(E, E). */ public void undoModify(final E oldElement, final E newElement, final UndoInfo<E> undoInfo) { final int c = undoInfo.createdInsertionPoint; if (c >= 0) { created.set(c, undoInfo.trashed); } else { final int d = undoInfo.deletedInsertionPoint; if (d < 0) { remove(created, c, newElement); remove(deleted, d, oldElement); } } }
/** * Undo the previous create(E) operation. Note that the behavior is * undefined if the previous operation is not create(E). */ public void undoCreate(final E element, final int insertionPoint) { remove(created, insertionPoint, element); }
/** * Undo the previous create(E) operation. Note that the behavior is * undefined if the previous operation is not create(E). */ public void undoCreate(final E element, final int insertionPoint) { remove(created, insertionPoint, element); }
/** * Undo the previous delete(E) operation. Note that the behavior is * undefined if the previous operation is not delete(E). */ public void undoDelete(final E element, final UndoInfo<E> undoInfo) { final int c = undoInfo.createdInsertionPoint; if (c >= 0) { created.add(c, undoInfo.trashed); } else { remove(deleted, undoInfo.deletedInsertionPoint, element); } }
/** * Undo the previous delete(E) operation. Note that the behavior is * undefined if the previous operation is not delete(E). */ public void undoDelete(final E element, final UndoInfo<E> undoInfo) { final int c = undoInfo.createdInsertionPoint; if (c >= 0) { created.add(c, undoInfo.trashed); } else { remove(deleted, undoInfo.deletedInsertionPoint, element); } }
/** * Undo the previous modify(E, E) operation. Note that the behavior * is undefined if the previous operation is not modify(E, E). */ public void undoModify(final E oldElement, final E newElement, final UndoInfo<E> undoInfo) { final int c = undoInfo.createdInsertionPoint; if (c >= 0) { created.set(c, undoInfo.trashed); } else { final int d = undoInfo.deletedInsertionPoint; if (d < 0) { remove(created, c, newElement); remove(deleted, d, oldElement); } } }
/** * Undo the previous modify(E, E) operation. Note that the behavior * is undefined if the previous operation is not modify(E, E). */ public void undoModify(final E oldElement, final E newElement, final UndoInfo<E> undoInfo) { final int c = undoInfo.createdInsertionPoint; if (c >= 0) { created.set(c, undoInfo.trashed); } else { final int d = undoInfo.deletedInsertionPoint; if (d < 0) { remove(created, c, newElement); remove(deleted, d, oldElement); } } }