frisbee icon indicating copy to clipboard operation
frisbee copied to clipboard

PulseAdapter has a confusing setup

Open stefanhoth opened this issue 8 years ago • 2 comments

PulseAdapter needs to be able to sort entries by value.

This could be easily handled through a TreeMap with PulseEntry implementing Comparable (or a static Comparator) but instead the adapter stores values in an ArrayList<Map.Entry<String, PulseEntry>> which I would call confusing and inefficient.

stefanhoth avatar Sep 09 '15 15:09 stefanhoth

@stefanhoth Could you elaborate how to get this less confusing?

The current constraints are:

  • Pulse is a HashMap, that is why Map.Entry is used in the adapter
  • The adapter needs to return an item for a given position
  • The sorting depends on the mode the adapter is used in.

friedger avatar Jun 03 '16 12:06 friedger

@stefanhoth Should we close this?

friedger avatar Sep 13 '16 08:09 friedger