maspack.util
Class ListRemove<C>
java.lang.Object
maspack.util.ListRemove<C>
public class ListRemove<C>
- extends java.lang.Object
A utility class to remove items from a list, and (later) return them to the
list in the same order. The basic usage model is this:
List list;
...
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.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ListRemove
public ListRemove(java.util.List<C> list)
getList
public java.util.List<C> getList()
requestRemove
public void requestRemove(int idx)
requestRemoveAll
public void requestRemoveAll(java.util.Collection<java.lang.Integer> idxs)
remove
public void remove()
undo
public void undo()