package Ġcom . github . ch u ross . m ori router Ċ Ċ import Ġandroid . support . v 4 . app . Fragment Ċ import Ġandroid . support . v 4 . app . FragmentManager Ċ import Ġandroid . support . v 4 . app . Fragment Pager Adapter Ċ import Ġandroid . view . ViewGroup Ċ Ċ class ĠFragment Pager Adapter ( fragment Manager : ĠFragment Manager , Ġprivate Ġval Ġcontents : ĠList < Pair < String , Ġ() Ġ-> ĠFragment >>) Ġ: ĠFragment Pager Adapter ( fragment Manager ) Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġget Page Title ( position : ĠInt ): ĠCharSequence ? Ġ= Ġcontents [ position ]. first ĊĊĠĠĠ Ġoverride Ġfun ĠgetItem ( position : ĠInt ): ĠFragment Ġ= Ġcontents [ position ]. second . invoke () ĊĊĠĠĠ Ġoverride Ġfun Ġget Count (): ĠInt Ġ= Ġcontents . size ĊĊĠĠĠ Ġoverride Ġfun Ġinstantiate Item ( container : ĠViewGroup , Ġposition : ĠInt ): ĠFragment Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġsuper . instantiate Item ( container , Ġposition ) Ġas ĠFragment ĊĠĠĠ Ġ} Ċ }