1

How can I use multiple sort conditions with lambdaj? e.g. to obtain a List ordered first by name, then by age:

  • Name Age
  • nameA 14
  • nameB 12
  • nameB 15
  • nameC 10
  • nameC 11

Thanks for you help.

rodtakular
  • 303
  • 2
  • 8

1 Answers1

0

Take a look into my answer for similar question: lambdaj and Multiple Sort Conditions in Java. In short - you need dig little bit into lambdaj source code, but solution is quite straightforward.

Community
  • 1
  • 1
Petro Semeniuk
  • 6,970
  • 10
  • 42
  • 65
  • I had already looked that question, but the answer suggests adding another library and not using the nice functional-like lambdaj syntax. Maybe it is possible with lambdaj-collections? – rodtakular Jan 23 '13 at 17:40