public static < S , R > ObjectBinding < R > map ( ObservableValue < S > source , Function < ? super S , ? extends R > function , R defaultValue ) { return Bindings . createObjectBinding ( ( ) -> { S sourceValue = source . getValue ( ) ; if ( sourceValue == null ) { return defaultValue ; } else { return function . apply ( sourceValue ) ; } } , source ) ; }
A null safe binding that holds the return value of the given function when applied to the value of the given observable .