package Ġio . red green . on ew ay . catalog ue . signup . use cases Ċ Ċ import Ġio . reactivex . Observable Ċ import Ġio . reactivex . Observable Source Ċ import Ġio . reactivex . Observable Transformer Ċ import Ġio . reactivex . rx kotlin . with Latest From Ċ import Ġio . red green . on ew ay . catalog ue . signup . SignUp State Ċ import Ġio . red green . on ew ay . catalog ue . signup . drivers . Display Error Event Ċ import Ġio . red green . on ew ay . catalog ue . signup . form . Which Field . PHONE _ NUMBER Ċ import Ġio . red green . on ew ay . catalog ue . signup . form . Which Field . USERNAME Ċ Ċ class ĠDisplay Error Events UseCase ( ĊĠĠĠ Ġprivate Ġval Ġsource Copy : ĠObservable < SignUp State > Ċ ) Ġ: ĠObservable Transformer < Display Error Event , ĠSign Up State > Ġ{ ĊĠ Ġoverride Ġfun Ġapply ( ĊĠĠĠĠĠ Ġdisplay Error Events : ĠObservable < Display Error Event > ĊĠ Ġ): ĠObservable Source < SignUp State > Ġ{ ĊĠĠĠ Ġreturn Ġdisplay Error Events ĊĠĠĠĠĠĠĠ Ġ. with Latest From ( source Copy ) Ġ{ Ġerror Event , Ġstate Ġ-> ĊĠĠĠĠĠĠĠĠĠ Ġwhen Ġ( error Event . which Field ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠPH ONE _ NUMBER Ġ-> Ġstate . phoneNumber Display Error ( error Event . display ) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠUSER NAME Ġ-> Ġstate . username Display Error ( error Event . display ) ĊĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ