Created
September 27, 2017 22:30
-
-
Save alvareztech/5fc8a963ed98d11ee7aa9af777639cc8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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