Guest User

Untitled

a guest
Jun 19th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. @Entity
  2. class CCExchanges : HashMap<String, CCTradePairs>() {
  3.  
  4.  
  5. @PrimaryKey
  6. var id: Int = 0
  7.  
  8.  
  9. fun getExchangeList(): ArrayList<String> {
  10. return ArrayList(keys)
  11. }
  12.  
  13. fun getTradePairs(exchange: String): CCTradePairs {
  14. return get(exchange) ?: CCTradePairs()
  15. }
  16.  
  17. override fun toString(): String {
  18. return "CCExchanges(id=$id) ${super.toString()}"
  19. }
  20. }
  21.  
  22. @Insert(onConflict = OnConflictStrategy.REPLACE)
  23. fun insert(ccExchanges: CCExchanges)
Add Comment
Please, Sign In to add comment