|
Eidola home | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eidola.util.CollectionDiff
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.
Constructor Summary | |
CollectionDiff(Collection oldStuff,
Collection newStuff)
Prepares a comparison of two collections without creating an internal copy. |
|
CollectionDiff(Collection oldStuff,
Collection newStuff,
boolean copy)
Prepares a comparison of two collections, optionally creating an internal copy of the collections to allow subsequent modification. |
Method Summary | |
boolean |
equals(Object other)
Returns true if the other object is a collection diff comparing equal collections. |
Set |
getAdded()
Returns the objects which are in newStuff but not oldStuff. |
Set |
getRemoved()
Returns the objects which are in oldStuff but not newStuff. |
Set |
getSame()
Returns the objects which are in both oldStuff and newStuff. |
int |
hashCode()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CollectionDiff(Collection oldStuff, Collection newStuff)
public CollectionDiff(Collection oldStuff, Collection newStuff, boolean copy)
Method Detail |
public Set getAdded()
public Set getRemoved()
public Set getSame()
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
Eidola home | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |