package Ġcom . tre lla . domain Ċ Ċ import Ġcom . tre lla . common . base . Base UseCase Ċ import Ġcom . tre lla . common . schedul ers . Base Scheduler Provider Ċ import Ġcom . tre lla . data . Shipment Entity To Shipment Mapper Ċ import Ġcom . tre lla . domain . model . Shipment Ċ import Ġcom . tre lla . ui . Home Repository Ċ import Ġio . reactivex . Maybe Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠGet Ship ments UseCase Ġ@ Inject Ġconstructor ( ĊĠĠĠ Ġprivate Ġval Ġrepository : ĠHome Repository , ĊĠĠĠ Ġprivate Ġval Ġship ment Mapper : ĠShip ment Entity To Shipment Mapper , ĊĠĠĠ Ġbase Scheduler Provider : ĠBase Scheduler Provider Ċ ) Ġ: ĠBase UseCase ( base Scheduler Provider ) Ġ{ ĊĊĠĠĠ Ġfun ĠgetAll Ship ments ( latitude : ĠDouble ? Ġ= Ġnull , Ġlongitude : ĠDouble ? Ġ= Ġnull ): ĠMaybe < List < Shipment >> Ġ= ĊĠĠĠĠĠĠĠ Ġrepository . get Ship ments ( latitude , Ġlongitude ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. map ( shipment Mapper :: map ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. compose ( apply Schedulers Maybe ()) ĊĊ Ċ }