Skip to content

Instantly share code, notes, and snippets.

@alvareztech
Created September 27, 2017 22:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alvareztech/5fc8a963ed98d11ee7aa9af777639cc8 to your computer and use it in GitHub Desktop.
Save alvareztech/5fc8a963ed98d11ee7aa9af777639cc8 to your computer and use it in GitHub Desktop.
Queue<Persona> cola = new PriorityQueue<Persona>(new Comparator<Persona>() {
@Override
public int compare(Persona o1, Persona o2) {
if (getValor(o1) > getValor(o2)) {
return -1;
}
if (getValor(o1) < getValor(o2)) {
return 1;
}
return 0;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment