public class ListRemove<C>
extends java.lang.Object
Listlist; ... ListRemove listRemove = new ListRemove (list); for (int i=0; i Item to be removed are specified by index. The class attempts to preform the remove in O(n) time.
Constructor and Description |
---|
ListRemove(java.util.List<C> list) |
Modifier and Type | Method and Description |
---|---|
java.util.List<C> |
getList() |
void |
remove() |
void |
requestRemove(int idx) |
void |
requestRemoveAll(java.util.Collection<java.lang.Integer> idxs) |
void |
undo() |
public ListRemove(java.util.List<C> list)
public java.util.List<C> getList()
public void requestRemove(int idx)
public void requestRemoveAll(java.util.Collection<java.lang.Integer> idxs)
public void remove()
public void undo()