net.innig.collect
Class DefaultListMutator
java.lang.Object
net.innig.collect.DefaultListMutator
- All Implemented Interfaces:
- ListMutator
public class DefaultListMutator
- extends java.lang.Object
- implements ListMutator
Applies the steps of a list diff to another list. You can use this to keep
one list in synch with another. Override individual methods to take special action
when objects are inserted, moved, or removed from the list.
|
Maturity:
This is a mature API, and a stable implementation.
It performs well in informal testing, but has not undergone
methodical or real-world testing.
|
|
Plans:
There are no current plans to expand or revise this class's functionality.
It would be worth researching alternative algorithms for generating the steps.
|
- Version:
- [Development version]
- Author:
- Paul Cantrell
- See Also:
ListDiff
|
Method Summary |
void |
insert(java.lang.Object object,
int index)
|
void |
move(java.lang.Object object,
int index,
int toIndex)
|
void |
remove(java.lang.Object object,
int index)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultListMutator
public DefaultListMutator(java.util.List list)
insert
public void insert(java.lang.Object object,
int index)
- Specified by:
insert in interface ListMutator
remove
public void remove(java.lang.Object object,
int index)
- Specified by:
remove in interface ListMutator
move
public void move(java.lang.Object object,
int index,
int toIndex)
- Specified by:
move in interface ListMutator