private static OptimizationPlanElement[] toArray(ArrayList<OptimizationPlanElement> planElementList){
  OptimizationPlanElement[] p=new OptimizationPlanElement[planElementList.size()];
  planElementList.toArray(p);
  return p;
}

private static OptimizationPlanElement [ ] toArray ( ArrayList < OptimizationPlanElement > planElementList ) { OptimizationPlanElement [ ] p = new OptimizationPlanElement [ planElementList . size ( ) ] ; planElementList . toArray ( p ) ; return p ; }
convert the arraylist to an array of elements .
