org.aksw.commons.collection.observable.CollectionChangedEventImpl Maven / Gradle / Ivy
package org.aksw.commons.collection.observable;
import java.util.Collection;
import java.util.Collections;
public class CollectionChangedEventImpl
extends CollectionChangedEvent
{
protected Collection additions;
protected Collection deletions;
protected Collection refreshes;
// public CollectionChangedEvent(Object source, String propertyName, Object oldValue, Object newValue) {
// super(source, propertyName, oldValue, newValue);
// }
public CollectionChangedEventImpl(Object source,
Object oldValue,
Object newValue,
Collection additions,
Collection deletions,
Collection refreshes) {
super(source, "items", oldValue, newValue);
this.additions = additions == null ? Collections.emptySet() : additions;
this.deletions = deletions == null ? Collections.emptySet() : deletions;
this.refreshes = refreshes == null ? Collections.emptySet() : refreshes;
}
public Collection getAdditions() {
return additions;
}
public Collection getDeletions() {
return deletions;
}
public Collection getRefreshes() {
return refreshes;
}
@Override
public String toString() {
return "CollectionChangedEventImpl [additions=" + additions + ", deletions=" + deletions + ", refreshes="
+ refreshes + ", newValue= " + getNewValue() + ", oldValue=" + getOldValue() + "]";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy