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

ru.greatbit.utils.collection.Difference Maven / Gradle / Ivy

package ru.greatbit.utils.collection;

import java.util.LinkedList;
import java.util.List;

/**
 * Created by azee on 4/29/14.
 */
public class Difference {

    private List removed;
    private List added;
    private List equal;

    public List getRemoved(){
        if (removed == null){
            removed = new LinkedList();
        }
        return removed;
    }

    public List getAdded(){
        if (added == null){
            added = new LinkedList();
        }
        return added;
    }

    public List getEqual(){
        if (equal == null){
            equal = new LinkedList();
        }
        return equal;
    }

    public List getMerged(){
        List result = new LinkedList();
        result.addAll(equal);
        result.addAll(removed);
        result.addAll(added);
        return result;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy