public static <T,R>R[] map(Collection2<T> coll,Function<? super T,? extends R> evalFunction,Class<R> klass){
  R[] newArray=create(coll.size(),klass);
  int i=0;
  for (  T elem : coll) {
    newArray[i]=evalFunction.apply(elem);
    i++;
  }
  return newArray;
}

public static < T , R > R [ ] map ( Collection2 < T > coll , Function < ? super T , ? extends R > evalFunction , Class < R > klass ) { R [ ] newArray = create ( coll . size ( ) , klass ) ; int i = 0 ; for ( T elem : coll ) { newArray [ i ] = evalFunction . apply ( elem ) ; i ++ ; } return newArray ; }
creates a new array , based on given coll , whose elements are produced element - wise from the original coll using given evalfunction .
