Skip to content

"ticker" is used both as id and name for the Stock #5

@alboteanud

Description

@alboteanud

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions