Hi,
I have a trivial problem. I am trying to sort an array whose data model
implements the PropertyBusinessObject classes. The field I want to sort by
is "distance."
My code:
Response<Map> jVisita =
VisitaService.listaVisitas(System.currentTimeMillis());
Map<Integer, Visita> m = jVisita.getResponseData();
ArrayList tVisita = (ArrayList)
Result.fromContent(m).getAsArray("root");
ArrayList aVisita = new ArrayList();
Visita v = new Visita();
for (Object t : tVisita) {
v.getPropertyIndex().populateFromMap((Map) t);
v.distancia.set(distancia(v.latitud.get(), v.longitud.get()));
aVisita.add(v);
}
aVisita.sort(Comparator.comparing(Visita::distancia.get()));
//SHOW ERROR
--
You received this message because you are subscribed to the Google Groups
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/codenameone-discussions/46694739-8ca0-4b0c-8913-c2bdafffe6f2%40googlegroups.com.