All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.aksw.commons.collections.diff.CollectionDiff Maven / Gradle / Ivy

There is a newer version: 0.9.9
Show newest version
package org.aksw.commons.collections.diff;

import java.util.Collection;

/**
 * @author Claus Stadler
 *         

* Date: 7/12/11 * Time: 10:51 PM */ public abstract class CollectionDiff> extends Diff { public CollectionDiff(C added, C removed, C retained) { super(added, removed, retained); } public void add(T item) { getRemoved().remove(item); getAdded().add(item); } public void remove(T item) { getAdded().remove(item); getRemoved().add(item); } public void clear() { getAdded().clear(); getRemoved().clear(); } public int size() { return getAdded().size() + getRemoved().size(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy