public static String multiply(CharSequence self,Number factor){
  int size=factor.intValue();
  if (size == 0)   return "";
 else   if (size < 0) {
    throw new IllegalArgumentException("multiply() should be called with a number of 0 or greater not: " + size);
  }
  StringBuilder answer=new StringBuilder(self);
  for (int i=1; i < size; i++) {
    answer.append(self);
  }
  return answer.toString();
}

public static String multiply ( CharSequence self , Number factor ) { int size = factor . intValue ( ) ; if ( size == 0 ) return "" ; else if ( size < 0 ) { throw new IllegalArgumentException ( "multiply() should be called with a number of 0 or greater not: " + size ) ; } StringBuilder answer = new StringBuilder ( self ) ; for ( int i = 1 ; i < size ; i ++ ) { answer . append ( self ) ; } return answer . toString ( ) ; }
repeat a charsequence a certain number of times .
