package Ġcom . squareup . view registry . back stack Ċ Ċ import Ġandroid . support . transition . Scene Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġcom . squareup . view registry . Back Stack Screen Ċ import Ġcom . squareup . view registry . Back Stack Screen . Key Ċ import Ġcom . squareup . view registry . View Binding Ċ import Ġcom . squareup . view registry . View Registry Ċ import Ġcom . squareup . view registry . back stack . ViewState Stack . Direction Ċ import Ġcom . squareup . view registry . build Scene Ċ import Ġcom . squareup . view registry . build View Ċ import Ġio . reactivex . Observable Ċ import Ġkotlin . reflect . jvm . jvm Name Ċ Ċ /** Ċ Ġ* ĠAn Ġobject Ġthat Ġcan Ġchange Ġthe Ġcontents Ġof Ġa Ġcontainer Ġview Ġ( a Ġ[ ViewGroup ]) Ġfrom Ġthe Ġview Ċ Ġ* Ġfrom Ġone Ġ[ Back Stack Screen ] Ġto Ġanother . Ċ Ġ* Ċ Ġ* ĠOverride Ġthe Ġdefault Ġimplementation Ġof Ġ[ matches ] Ġto Ġrestrict Ġan Ġeffect Ġto Ġtransitions Ċ Ġ* Ġbetween Ġspecific Ġtypes Ġof Ġviews . ĠImplement Ġ[ execute ] Ġto Ġactually Ġperform Ġthe Ġwork . Ċ Ġ* Ċ Ġ* ĠEffect s Ġare Ġassemb led Ġby Ġ[ View Registry ] Ġinstances , Ġalong Ġwith Ġ[ View Binding ] s . Ċ Ġ* ĠWhen Ġa Ġcontainer Ġis Ġready Ġto Ġperform Ġa Ġtransition , Ġit Ġcan Ġcall Ġ[ View Registry . get Effect ] Ċ Ġ* Ġto Ġretrieve Ġthe Ġappropriate Ġeffect Ġto Ġrun . Ċ Ġ*/ Ċ interface ĠBack Stack Effect Ġ{ ĊĠ Ġ/** ĊĠĠ Ġ* ĠReturns Ġtrue Ġof Ġthis Ġeffect Ġcan Ġbe Ġapplied Ġto Ġthe Ġgiven Ġkeys Ġand Ġdirection . ĊĠĠ Ġ* ĠThe Ġdefault Ġimplementation Ġalways Ġreturns Ġtrue , Ġindicating Ġthat Ġthis Ġeffect ĊĠĠ Ġ* Ġcan Ġhandle Ġall Ġtransitions . ĊĠĠ Ġ*/ ĊĠ Ġfun Ġmatches ( ĊĠĠĠ Ġfrom : ĠKey <* >, ĊĠĠĠ Ġto : ĠKey <* >, ĊĠĠĠ Ġdirection : ĠView State Stack . Direction ĊĠ Ġ): ĠBoolean Ġ= Ġtrue ĊĊĠ Ġ/** ĊĠĠ Ġ* ĠPerform Ġthe Ġtransition . ĠRemember Ġthat : ĊĠĠ Ġ* ĊĠĠ Ġ* Ġ Ġ- ĠYou Ġcan Ġuse Ġ[ View . back Stack Key ] Ġto Ġextract Ġthe Ġkey Ġassociated Ġwith Ġ[ from ]. ĊĠĠ Ġ* ĊĠĠ Ġ* Ġ Ġ- ĠYou Ġcan Ġuse Ġ[ view For Wrapped Screen ] Ġor Ġ[ scene For Wrapped Screen ] Ġto Ġgive Ġthe Ġnew Ġview ĊĠĠ Ġ* ĠĠĠ Ġits Ġexpected Ġstream Ġof Ġproperly Ġtyped Ġscreen Ġobjects . ĊĠĠ Ġ* ĊĠĠ Ġ* Ġ Ġ- ĠYou Ġmust Ġcall Ġ[ setUp New View ] Ġon Ġthe Ġincoming Ġview Ġbefore Ġit Ġis Ġattached ĊĠĠ Ġ* ĠĠĠ Ġto Ġthe Ġwindow . ĊĠĠ Ġ*/ ĊĠ Ġfun Ġexecute ( ĊĠĠĠ Ġfrom : ĠView , ĊĠĠĠ Ġto : ĠBack Stack Screen <* >, ĊĠĠĠ Ġscreens : ĠObservable < out ĠBack Stack Screen <* >>, ĊĠĠĠ Ġview Registry : ĠView Registry , ĊĠĠĠ Ġcontainer : ĠViewGroup , ĊĠĠĠ ĠsetUp New View : Ġ( View ) Ġ-> ĠUnit , ĊĠĠĠ Ġdirection : ĠDirection ĊĠ Ġ) Ċ } Ċ Ċ /** Ċ Ġ* ĠF ishes Ġin Ġ[ view Registry ] Ġfor Ġthe Ġ[ View Binding ] Ġfor Ġtype Ġ[ T ] Ġand Ċ Ġ* Ġuses Ġit Ġto Ġinstantiate Ġa Ġ[ View ] Ġto Ġdisplay Ġany Ġmatching Ġitems Ċ Ġ* Ġreceived Ġvia Ġ[ back stack Scre ens ]. Ċ Ġ*/ Ċ fun Ġ< T Ġ: ĠAny > ĠBack Stack Screen < T >. view For Wrapped Screen ( ĊĠ Ġback stack Scre ens : ĠObservable < out ĠBack Stack Screen <* >>, ĊĠ Ġview Registry : ĠView Registry , ĊĠ Ġcontainer : ĠViewGroup Ċ ): ĠView Ġ{ ĊĠ Ġval Ġwrapped Scre ens : ĠObservable < out ĠT > Ġ= Ġback stack Scre ens . map To Wrapped Matching ( this ) ĊĠ Ġval Ġbinding : ĠView Binding < T > Ġ= Ġview Registry . get Binding ( key . type . jvm Name ) ĊĠ Ġreturn Ġbinding . build View ( wrapped Scre ens , Ġview Registry , Ġcontainer ) Ċ } Ċ Ċ /** Ċ Ġ* ĠF ishes Ġin Ġ[ view Registry ] Ġfor Ġthe Ġ[ View Binding ] Ġfor Ġtype Ġ[ T ] Ġand Ċ Ġ* Ġuses Ġit Ġto Ġinstantiate Ġa Ġ[ Scene ] Ġto Ġdisplay Ġany Ġmatching Ġitems Ċ Ġ* Ġreceived Ġvia Ġ[ back stack Scre ens ]. Ċ Ġ*/ Ċ fun Ġ< T Ġ: ĠAny > ĠBack Stack Screen < T >. scene For Wrapped Screen ( ĊĠ Ġback stack Scre ens : ĠObservable < out ĠBack Stack Screen <* >>, ĊĠ Ġview Registry : ĠView Registry , ĊĠ Ġcontainer : ĠViewGroup , ĊĠ Ġenter Action : Ġ(( Scene ) Ġ-> ĠUnit )? Ġ= Ġnull Ċ ): ĠScene Ġ{ ĊĠ Ġval Ġwrapped Scre ens : ĠObservable < out ĠT > Ġ= Ġback stack Scre ens . map To Wrapped Matching ( this ) ĊĠ Ġval Ġbinding : ĠView Binding < T > Ġ= Ġview Registry . get Binding ( key . type . jvm Name ) ĊĠ Ġreturn Ġbinding . build Scene ( wrapped Scre ens , Ġview Registry , Ġcontainer , Ġenter Action ) Ċ } Ċ