/* Ċ Ġ* ĠDesign ed Ġand Ġdeveloped Ġby ĠD am ian Ġvan Ġden ĠB erg . Ċ Ġ* Ċ Ġ* ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* Ċ Ġ* ĠĠĠĠ Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ*/ Ċ Ċ package Ġcom . dv db . material checklist . manager . checklist . model Ċ Ċ import Ġcom . dv db . material checklist . manager . model . Checklist Item Container Ċ import Ġcom . dv db . material checklist . recycler . base . model . Base Recycler Item Ċ import Ġcom . dv db . material checklist . recycler . checklist . model . Checklist Recycler Item Ċ import Ġcom . dv db . material checklist . recycler . checklist new . model . Checklist New Recycler Item Ċ import Ġcom . dv db . material checklist . recycler . util . Default Recycler Item Comparator Ċ import Ġcom . dv db . material checklist . recycler . util . Recycler Item Mapper Ċ Ċ internal Ġfun ĠChecklist Item Container . transform (): ĠList < Base Recycler Item > Ġ{ ĊĠĠĠ Ġval Ġun sorted Items Ġ= ĠRe cycler Item Mapper . to Items ( formatted Text ) ĊĊĠĠĠ Ġreturn Ġif Ġ( un sorted Items . isNotEmpty ()) Ġ{ ĊĠĠĠĠĠĠĠ Ġun sorted Items . filter Is Instance < Checklist Recycler Item >() ĊĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠ ĠlistOf ( Checklist Recycler Item ("")) ĊĠĠĠ Ġ}. plus ( Checklist New Recycler Item ()) ĊĠĠĠĠĠĠĠ Ġ. sorted With ( Default Recycler Item Comparator ) Ċ }