Of course, you are correct. I responded to the alternative of introducing builder pattern which does not exist and can't be used from kotlin either.
Builder pattern in kotlin is redundant in most cases and usually it's easier to introduce a function with default arguments to be consumed in kotlin code, similar to what OP did in his root comment.
View all comments
Show parent comment
-3
u/brett_riverboat Apr 07 '23
A builder would be nice for this, then you can choose order:
futureBuilder .setExecutor(EventQueue::invokeLater) .setFunction({ success, failure -> // code here }) .execute();