mirror of https://github.com/zlatinb/muwire
Use Collator for sorting Personas, GitHub issue #140
parent
a29868ab4d
commit
d3dcbba34c
|
@ -2,9 +2,11 @@ package com.muwire.gui
|
||||||
|
|
||||||
import com.muwire.core.Persona
|
import com.muwire.core.Persona
|
||||||
|
|
||||||
|
import java.text.Collator
|
||||||
|
|
||||||
class PersonaComparator implements Comparator<Persona>{
|
class PersonaComparator implements Comparator<Persona>{
|
||||||
@Override
|
@Override
|
||||||
int compare(Persona a, Persona b) {
|
int compare(Persona a, Persona b) {
|
||||||
return String.compare(a.getHumanReadableName(), b.getHumanReadableName())
|
return Collator.getInstance().compare(a.getHumanReadableName(), b.getHumanReadableName())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue