public final void print ( CharSequence separator , int charsPerLine ) { boolean first = true ; int len = 0 ; for ( T v : this ) { String s = String . valueOf ( v ) ; if ( first ) { System . out . print ( s ) ; len += s . length ( ) ; first = false ; } else { System . out . print ( separator ) ; len += separator . length ( ) ; if ( len > charsPerLine ) { System . out . println ( ) ; System . out . print ( s ) ; len = s . length ( ) ; } else { System . out . print ( s ) ; len += s . length ( ) ; } } } }
Prints the elements of this sequence to the console separated by the given separator and with a line break after roughly the given charsPerLine amount .