refactor Java itemset API