bod
08/03/2019, 3:10 PMPair<Date>
for it. This way from Kotlin it's nice, you can do foobar(dateFrom to dateTo)
. But from Java you're going to have to do foobar(new kotlin.Pair<>(dateFrom, dateTo))
and now you need Kotlin in your dependencies for this to work - not cool. Ideally I'd like to have both to
and not this Java issue... Ideas?tipsy
08/03/2019, 3:26 PMI'm making a lib in Kotlin, and want to make it nice to use from Kotlin and Javawrite it in java
bod
08/03/2019, 3:28 PMto
work in Java?Mark Murphy
08/03/2019, 3:32 PMfoobar(Date, Date)
method. You could offer a Kotlin wrapper library that has your foobar(Pair<Date>)
API via an extension function.bod
08/03/2019, 3:35 PMDateRange
class then. Yeah the extension sounds good. Thankslouiscad
08/03/2019, 3:58 PMkarelpeeters
08/03/2019, 5:31 PM..
instead of to
if it's really a range.bod
08/03/2019, 9:01 PMbod
08/03/2019, 9:01 PM..
may be cool indeed yes