public static <T>T splitEachLine(CharSequence self,CharSequence regex,@ClosureParams(value=FromString.class,options={"List<String>","String[]"},conflictResolutionStrategy=PickFirstResolver.class) Closure<T> closure) throws IOException {
  return splitEachLine(self,Pattern.compile(regex.toString()),closure);
}

public static < T > T splitEachLine ( CharSequence self , CharSequence regex , @ ClosureParams ( value = FromString . class , options = { "List<String>" , "String[]" } , conflictResolutionStrategy = PickFirstResolver . class ) Closure < T > closure ) throws IOException { return splitEachLine ( self , Pattern . compile ( regex . toString ( ) ) , closure ) ; }
iterates through the given charsequence line by line , splitting each line using the given regex delimiter . the list of tokens for each line is then passed to the given closure .
