Marco_dev
Marco_dev

Reputation: 53

Extract object from list java with lambdaj

I have a list of with some fields, one of these is "number plate".

From the HTML arrives the number plate and I want extract the object car with number plate equal to that which arrives.

I want use lambdaj but I have a some problem.

Car car=selectFirst(flatten(extract(listCar, on(Car.class).getClass())),
                              having(on(car.class).getClass(), equalTo("mycode")));

If I put getNumberPlate, the code say the not exist! I must insert getClass O.o

PS. I must use Java 1.6. I can't use Java Lambda ( Java 1.8 version)

Upvotes: 2

Views: 207

Answers (0)

Related Questions