package Ġcom . alg ol ia . instant search . core . selectable Ċ Ċ import Ġcom . alg ol ia . instant search . core . Presenter Ċ import Ġcom . alg ol ia . instant search . core . connection . Connection Impl Ċ import Ġcom . alg ol ia . instant search . core . Callback ĊĊ Ċ internal Ġdata Ġclass ĠSelect able Item Connection View < I , ĠO >( ĊĠĠĠ Ġprivate Ġval ĠviewModel : ĠSelect able Item ViewModel < I >, ĊĠĠĠ Ġprivate Ġval Ġview : ĠSelect able Item View < O >, ĊĠĠĠ Ġprivate Ġval Ġpresenter : ĠPres enter < I , ĠO > Ċ ) Ġ: ĠConnection Impl () Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġupdate Item : ĠCallback < I > Ġ= Ġ{ Ġitem Ġ-> ĊĠĠĠĠĠĠĠ Ġview . setItem ( presenter ( item )) ĊĠĠĠ Ġ} ĊĠĠĠ Ġprivate Ġval Ġupdate Is Selected : ĠCallback < Boolean > Ġ= Ġ{ Ġis Selected Ġ-> ĊĠĠĠĠĠĠĠ Ġview . setIs Selected ( isSelected ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġconnect () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . connect () ĊĠĠĠĠĠĠĠ ĠviewModel . item . subscribe Past ( update Item ) ĊĠĠĠĠĠĠĠ ĠviewModel . isSelected . subscribe Past ( update Is Selected ) ĊĠĠĠĠĠĠĠ Ġview . on Selection Changed Ġ= Ġ( viewModel . event Selection :: send ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġdisconnect () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . disconnect () ĊĠĠĠĠĠĠĠ ĠviewModel . item . unsubscribe ( update Item ) ĊĠĠĠĠĠĠĠ ĠviewModel . isSelected . unsubscribe ( update Is Selected ) ĊĠĠĠĠĠĠĠ Ġview . on Selection Changed Ġ= Ġnull ĊĠĠĠ Ġ} Ċ }