org.omnaest.utils.structure.collection.set
Class SetDelta<E>

java.lang.Object
  extended by org.omnaest.utils.structure.collection.set.SetDelta<E>
Type Parameters:
E -

public class SetDelta<E>
extends Object

A SetDelta calculates the changes between two given Sets

Author:
Omnaest

Constructor Summary
SetDelta(Set<E> firstSet, Set<E> secondSet)
           
 
Method Summary
 boolean equals(Object obj)
           
 Set<E> getAddedElementSet()
          Returns all elements which have been added to the first Set to became the second Set
 Set<E> getRemovedElementSet()
          Returns all elements which have been removed from the first Set to become the second Set
 Set<E> getRetainedElementSet()
          Returns all elements which does not have changed between the first and the second Set
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SetDelta

public SetDelta(Set<E> firstSet,
                Set<E> secondSet)
Parameters:
firstSet -
secondSet -
See Also:
SetDelta
Method Detail

getAddedElementSet

public Set<E> getAddedElementSet()
Returns all elements which have been added to the first Set to became the second Set

Returns:

getRemovedElementSet

public Set<E> getRemovedElementSet()
Returns all elements which have been removed from the first Set to become the second Set

Returns:

getRetainedElementSet

public Set<E> getRetainedElementSet()
Returns all elements which does not have changed between the first and the second Set

Returns:

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2013. All Rights Reserved.