|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.innig.collect.CollectionDiff<E>
public class CollectionDiff<E>
Finds the difference between two Collections.
This class returns the delta using Set,
and therefore ignores duplicates and reordering.
CollectionDiff optionally creates internal copies of the input Collections. If you do not use this option, the results of CollectionDiff methods after a subsequent modification of the input collections are undefined.
| 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. |
| Constructor Summary | |
|---|---|
CollectionDiff(java.util.Collection<? extends E> oldStuff,
java.util.Collection<? extends E> newStuff)
Prepares a comparison of two collections without creating an internal copy. |
|
CollectionDiff(java.util.Collection<? extends E> oldStuff,
java.util.Collection<? extends E> newStuff,
boolean copy)
Prepares a comparison of two collections, optionally creating an internal copy of the collections to allow subsequent modification of the collections being compared. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object other)
Returns true if the other object is a collection diff comparing equal collections. |
java.util.Set<E> |
getAdded()
Returns the objects which are in newStuff but not oldStuff. |
java.util.Set<E> |
getRemoved()
Returns the objects which are in oldStuff but not newStuff. |
java.util.Set<E> |
getSame()
Returns the objects which are in both oldStuff and newStuff. |
int |
hashCode()
|
boolean |
sameElements()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CollectionDiff(java.util.Collection<? extends E> oldStuff,
java.util.Collection<? extends E> newStuff)
public CollectionDiff(java.util.Collection<? extends E> oldStuff,
java.util.Collection<? extends E> newStuff,
boolean copy)
| Method Detail |
|---|
public java.util.Set<E> getAdded()
public java.util.Set<E> getRemoved()
public java.util.Set<E> getSame()
public boolean sameElements()
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||