public static StringBinding transforming ( ObservableValue < String > text , Function < String , String > transformer ) { return Bindings . createStringBinding ( ( ) -> { Function < String , String > func = transformer == null ? Function . identity ( ) : transformer ; return text . getValue ( ) == null ? "" : func . apply ( text . getValue ( ) ) ; } , text ) ; }
Creates a string binding that contains the value of the given observable string transformed using the supplied function .