package Ġrx . lang . kotlin Ċ Ċ import Ġrx . Single Ċ import Ġrx . Single Subscriber Ċ import Ġrx . Subscription Ċ import Ġjava . util . concurrent . Callable Ċ import Ġjava . util . concurrent . Future Ċ Ċ fun Ġ< T > Ġsingle ( body : Ġ( s : ĠSingle Subscriber < in ĠT >) Ġ-> ĠUnit ): ĠSingle < T > Ġ= ĠSingle . create ( body ) Ċ fun Ġ< T > Ġsingle Of ( value : ĠT ): ĠSingle < T > Ġ= ĠSingle . just ( value ) Ċ fun Ġ< T > ĠFuture < T >. to Single (): ĠSingle < T > Ġ= ĠSingle . from ( this ) Ċ fun Ġ< T > ĠCallable < T >. to Single (): ĠSingle < T > Ġ= ĠSingle . from Callable Ġ{ Ġthis . call () Ġ} Ċ fun Ġ< T > ĠThrowable . to Single (): ĠSingle < T > Ġ= ĠSingle . error ( this ) Ċ Ċ /** Ċ Ġ* ĠSubscribe Ġwith Ġa Ġsubscriber Ġthat Ġis Ġconfigured Ġinside Ġbody Ċ Ġ*/ Ċ inline Ġfun Ġ< T > ĠSingle < T >. subscribe With ( body : ĠFunction Single Subscriber Modifier < T >. () Ġ-> ĠUnit ): ĠSubscription Ġ{ ĊĠĠĠ Ġval Ġmodifier Ġ= ĠFunction Single Subscriber Modifier ( single Subscriber < T >()) ĊĠĠĠ Ġmodifier . body () ĊĠĠĠ Ġreturn Ġsubscribe ( modifier . subscriber ) Ċ } Ċ