"ticker" is used both as id and name for the Stock
Opened this issue · 0 comments
I had some confusions
data class StockPrice(
val ticker: String,
val price: Float,
val time: Date
)
"ticker" is to be used as a name for the stock.
abstract class BaseStockRepository : StockRepository {
override val allTickers: SortedSet = sortedSetOf(
"HSTK", "FBAS", "QIX", "GORF"... )
}
"allTickers" are to be used as ids
In my opinion, "ticker" could be renamed to "stockName" (in the model class).
Also "allTickers" could be renamed to "allStockIds". Other places also to be replaced with this names.
Overall, this repo and the video (droidcon NYC 2018) helped me a lot - it took like 2-3 days to me to get a grip on the code. I think this is a good pattern: a repo + a video.
I build an android app "GroupMap".
Thank you!