package Ġcn . break bad . ex ch anger ate Ċ Ċ import Ġcn . break bad . ex ch anger ate . executor . ERROR _ EX CHANGE _ RATE Ċ import Ġcn . break bad . ex ch anger ate . executor . Exchange Rate Executor Ċ import Ġcn . break bad . ex ch anger ate . executor . Hl An seo Web Executor Ċ import Ġcn . break bad . ex ch anger ate . util . Currency Util Ċ import Ġjava . util . Currency Ċ Ċ public Ġopen Ġclass ĠExchange Rate ( private Ġvar Ġexchange Rate Executor : ĠExchange Rate Executor Ġ= ĠH l An seo Web Executor ()) Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġcurrency Util : ĠCurrency Util Ġby Ġlazy Ġ{ ĠCurrency Util () Ġ} ĊĊĠĠĠ Ġopen Ġfun Ġget Exchange Rate ( target Currency Code : ĠString , Ġto Currency Code : ĠString ): ĠDouble Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġtarget Ġ= Ġcurrency Util . getC urrency ( target Currency Code ) Ġ?: Ġreturn ĠERROR _ EX CHANGE _ RATE ĊĠĠĠĠĠĠĠ Ġval Ġto Ġ= Ġcurrency Util . getC urrency ( to Currency Code ) Ġ?: Ġreturn ĠERROR _ EX CHANGE _ RATE ĊĠĠĠĠĠĠĠ Ġreturn Ġget Exchange Rate ( target , Ġto ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġopen Ġfun Ġget Exchange Rate ( target Currency Code : ĠString , Ġvar arg Ġto Currency Codes : ĠString ): ĠMap < Currency , ĠDouble > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġget Exchange Rate ( target Currency Code , Ġto Currency Codes . asList ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġopen Ġfun Ġget Exchange Rate ( target Currency Code : ĠString , Ġto s : ĠList < String >): ĠMap < Currency , ĠDouble > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġtarget Ġ= Ġcurrency Util . getC urrency ( target Currency Code ) Ġ?: Ġreturn Ġmap Of () ĊĠĠĠĠĠĠĠ Ġval Ġto Array Ġ= Ġcurrency Util . getC urrency Array ( tos ) Ġ?: Ġreturn Ġmap Of () ĊĠĠĠĠĠĠĠ Ġreturn Ġget Exchange Rate ( target , Ġto Array ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġopen Ġfun ĠgetAll Exchange Rate ( target Currency Code : ĠString ): ĠMap < Currency , ĠDouble > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġtarget Ġ= Ġcurrency Util . getC urrency ( target Currency Code ) Ġ?: Ġreturn Ġmap Of () ĊĠĠĠĠĠĠĠ Ġreturn Ġexchange Rate Executor . getAll Exchange Rate ( target ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġopen Ġfun Ġget Exchange Rate ( target : ĠCurrency , Ġto : ĠCurrency ): ĠDouble Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġexchange Rate Executor . get Exchange Rate ( target , Ġto ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġopen Ġfun Ġget Exchange Rate ( target : ĠCurrency , Ġvar arg Ġto s : ĠCurrency ): ĠMap < Currency , ĠDouble > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġget Exchange Rate ( target , Ġto s . asList ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġopen Ġfun Ġget Exchange Rate ( target : ĠCurrency , Ġto s : ĠList < Currency >): ĠMap < Currency , ĠDouble > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġexchange Rate Executor . get Exchange Rate ( target , Ġto s ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġopen Ġfun ĠgetAll Exchange Rate ( target : ĠCurrency ): ĠMap < Currency , ĠDouble >? Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġexchange Rate Executor . getAll Exchange Rate ( target ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġset Exchange Rate Executor ( exchange Rate Executor : ĠExchange Rate Executor ) Ġ{ ĊĠĠĠĠĠĠĠ Ġthis . exchange Rate Executor Ġ= Ġexchange Rate Executor ĊĠĠĠ Ġ} ĊĊ Ċ }