Created
February 17, 2018 17:45
-
-
Save antonicg/f9b61a0a4f9a08b9eea134b1da01f14d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun limitCryptoListSizeArrayEmptyCryptoViewModel(): List<CryptoViewModel> = | |
ArrayList<CryptoViewModel>(Collections.nCopies(LIMIT_CRYPTO_LIST, CryptoViewModel())) | |
fun cryptoPOJOmodel() = | |
Crypto("1", "name", "sy", 10, "100", "0.1", "100", "1000", "0", "500", "5", "10", "-10", "") | |
fun cryptoViewModelFrom(crypto:Crypto) = | |
CryptoViewModel(crypto.id, crypto.name, crypto.symbol, crypto.rank, crypto.priceUsd.toFloat(), crypto.priceBtc.toFloat(), crypto.percentChange24h.toFloat()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment