Mögliche Duplizieren:
Sorting an ArrayList of Contactssortiert eine Arraylist basierend auf einem Objektfeld
I DataNode
Objekte in einem ArrayList
sind zu speichern. Die DataNode
Klasse hat ein ganzzahliges Feld namens degree
. Ich möchte DataNode
Objekte von nodeList in der Reihenfolge degree
abrufen. Wie kann ich es tun.
List<DataNode> nodeList = new ArrayList<DataNode>();
Mögliche Duplikat http://stackoverflow.com/questions/2784514/sort-arraylist-of-custom-objects-by-property –
Auf einer zweiten tought http : //stackoverflow.com/questions/1814095/sorting-an-arlylist-of-contacts kann näher sein –
Siehe auch http://stackoverflow.com/questions/2535124/how-to-sort-an-arraylist- von-Objekten-durch-eine-Eigenschaft –