EmptySuggestion.kt 832 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package ml.adamsprogs.bimba.models.suggestions
  2. import android.content.Context
  3. import ml.adamsprogs.bimba.R
  4. class EmptySuggestion : GtfsSuggestion("Empty") {
  5. override fun equals(other: Any?): Boolean {
  6. return other != null && other is EmptySuggestion
  7. }
  8. override fun getIcon(): Int {
  9. return R.drawable.ic_error_outline
  10. }
  11. override fun getColour(): Int {
  12. return 0xffffff
  13. }
  14. override fun getBgColour(): Int {
  15. return 0x000000
  16. }
  17. override fun getBody(context: Context): String {
  18. return context.getString(R.string.nothing_found)
  19. }
  20. override fun compareTo(other: GtfsSuggestion): Int {
  21. return if (other is EmptySuggestion)
  22. 0
  23. else
  24. -1
  25. }
  26. override fun hashCode(): Int {
  27. return name.hashCode()
  28. }
  29. }