/* Copyright 2001 Michael R. Wick */ package Strategies; import java.util.Vector; import Shapes.*; public class CompositeShapeMutationStrategy extends ShapeMutationStrategy { Vector strategies; public CompositeShapeMutationStrategy(int w) { super(w); strategies = new Vector(); } public void add( ShapeMutationStrategy s ){ strategies.addElement(s); } public void mutate( Shape s ){ for(int i = 0; i < strategies.size(); i++){ ((ShapeMutationStrategy)(strategies.elementAt(i))).mutate(s); } } }