Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PulseAdapter has a confusing setup #487

Open
stefanhoth opened this issue Sep 9, 2015 · 2 comments
Open

PulseAdapter has a confusing setup #487

stefanhoth opened this issue Sep 9, 2015 · 2 comments

Comments

@stefanhoth
Copy link
Contributor

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.

@friedger
Copy link
Contributor

friedger commented Jun 3, 2016

@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
Copy link
Contributor

@stefanhoth Should we close this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants