Package org.hpccsystems.ws.client.utils
Class CollectionDelta
- java.lang.Object
-
- org.hpccsystems.ws.client.utils.CollectionDelta
-
public class CollectionDelta extends Object
Used internally to monitor and track changes in generic collections.
-
-
Field Summary
Fields Modifier and Type Field Description protected ArrayList<DataSingleton>addedprotected Stringcauseprotected ArrayList<DataSingleton>removedprotected ArrayList<DataSingleton>unchanged
-
Constructor Summary
Constructors Constructor Description CollectionDelta(String cause)CollectionDelta(String cause, Collection<T> before)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends DataSingleton>
CollectionDeltacalcChanges(Collection<T> after)<T extends DataSingleton>
CollectionDeltacalcChanges(T[] after)booleanexists(DataSingleton item)ArrayList<DataSingleton>getAdded()StringgetCause()booleanhasChanged()booleanremoveContains(DataSingleton item)
-
-
-
Field Detail
-
cause
protected String cause
-
added
protected ArrayList<DataSingleton> added
-
unchanged
protected ArrayList<DataSingleton> unchanged
-
removed
protected ArrayList<DataSingleton> removed
-
-
Constructor Detail
-
CollectionDelta
public CollectionDelta(String cause)
-
CollectionDelta
public CollectionDelta(String cause, Collection<T> before)
-
-
Method Detail
-
calcChanges
public <T extends DataSingleton> CollectionDelta calcChanges(T[] after)
-
calcChanges
public <T extends DataSingleton> CollectionDelta calcChanges(Collection<T> after)
-
hasChanged
public boolean hasChanged()
-
exists
public boolean exists(DataSingleton item)
-
getCause
public String getCause()
-
removeContains
public boolean removeContains(DataSingleton item)
-
getAdded
public ArrayList<DataSingleton> getAdded()
-
-