Apriori Algorithm in Java (implemented to understand easily)