frisbee
frisbee copied to clipboard
PulseAdapter has a confusing setup
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 Could you elaborate how to get this less confusing?
The current constraints are:
Pulseis 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.
@stefanhoth Should we close this?