package cz.muni.disa.adamiss.se.stats;

import cz.muni.disa.adamiss.core.objects.AdamissObject;
import cz.muni.disa.adamiss.core.objects.Transaction;

import java.util.HashSet;
import java.util.Set;

public class UniqueItemCounter {

    private final Set<AdamissObject> itemSet = new HashSet<>();

    public void processTransaction(Transaction transaction) {
        for (AdamissObject item : transaction.getData()) {
            itemSet.add(item);
        }
    }

    public int getUniqueItemCount(){
        return itemSet.size();
    }
}
