mardi 26 novembre 2019

Is there a way to sort a list by the degree of detail of objects?

I would like to sort a list by the degree of detail of the objects. The most detailed object should then be at the top of the list.

example: there is a class "position" with 4 attributes (latitude, longitude, altitude, accuracy)

there are three objects of the class "position"

  • obj1: (50.0000,10.0000,null,null)
  • obj2: (50.0000,10.0000,232,0.9)
  • obj3: (50.0000,10.0000,null,0.2)

The list should then have the following order: obj2, obj3, obj1

Could this be done by reflection?

Thx for your help.





Aucun commentaire:

Enregistrer un commentaire