/** * Make a copy of this sequential pattern * * @return the copy. */ public SequentialPattern cloneSequence() { // create a new empty sequential pattenr SequentialPattern sequence = new SequentialPattern(); // for each itemset for (Itemset itemset : itemsets) { // make a copy and add it sequence.addItemset(itemset.cloneItemSet()); } return sequence; // return the copy }