@ Nonnull public < T > Word < T > transform ( Function < ? super I , ? extends T > transformer ) { int len = length ( ) ; Object [ ] array = new Object [ len ] ; int i = 0 ; for ( I symbol : this ) { array [ i ++ ] = transformer . apply ( symbol ) ; } return new SharedWord <> ( array ) ; }
Transforms a word symbol - by - symbol using the specified transformation function .