Questions tagged [lambdaj]

LambdaJ is a library to manipulate a collections without any iterations.

LambdaJ is a library to manipulate a collections without any iterations. It allows to manipulate collections in a pseudo-functional and statically typed way.

The purpose of this library is to alleviate these problems employing some functional programming techniques but without losing the static typing of java. LambdaJ team imposes this last constraint to make refactoring easier and safer and allow the compiler to do its job.

For more information refer this : http://code.google.com/p/lambdaj/

84 questions
5
votes
2 answers

LambdaJ forEach set

I want to set value to a field of an object so that it will first get the previous value of that field and append something to it and the set it to that field. In LambdaJ forEach we can do something like…
Tapas Bose
  • 28,796
  • 74
  • 215
  • 331
4
votes
1 answer

Java stream alternative to LambdaJ index

What is Java stream API alternative to LambdaJ indexing? Let's say I have code like this List products = ... Map productsOnMonths = Lambda.index(products, Lambda.on(Product.class).getMonth()); Where I know that every…
Jan Krakora
  • 2,500
  • 3
  • 25
  • 52
4
votes
1 answer

lambdaJ and ClassCastException on simple select

I run out of ideas, Google also did not help. Use case seems to be trivial but it fails with ClassCastException. I don't know what I am doing wrong. There's a simple method to return first element matching a given category, take a look. private…
wilu
  • 549
  • 1
  • 12
  • 26
4
votes
1 answer

Extract object from nested array with lambdaj

I want to extract an object from a nested array with lambdaj. My model is a List of "Products" that own an arrays of "Elements": public class Product { Element[] elements; } public class Element { String code; } Somewhere in my code I have a…
Sylvain
  • 639
  • 5
  • 26
3
votes
1 answer

Simple extract with Lambdaj causes "Unable to convert placeholder null"

I have a simple pojo: class UserId { String ssn; String otsId; Integer actorId; public UserId(String ssn, String otsId, Integer actorId) { this.ssn = ssn; this.otsId = otsId; this.actorId = actorId; } @Override public…
vertti
  • 7,539
  • 4
  • 51
  • 81
3
votes
0 answers

lambdaj ProxyUtil.createEnhancer exception

Imported lambdaj successfully in my android app, however any filter, select or group operation raises this: 04-05 16:46:42.555: E/AndroidRuntime(8482): java.lang.ExceptionInInitializerError 04-05 16:46:42.555: E/AndroidRuntime(8482): at…
Peterdeka
  • 387
  • 5
  • 19
3
votes
0 answers

Lambdaj Error on Android

I am tryng to use lambdaj 2.4 with dependencies in my android application. However when I try to use following select statement: List list = select(listExpectedIncidentData, …
user846545
  • 151
  • 5
3
votes
2 answers

Use lambdaj library in android development

Is there any way to use the lambdaj library in android development ?
ARV
  • 395
  • 2
  • 6
  • 19
3
votes
3 answers

Using lambdaj with String.matches method

How to filter a Collection using lambdaj and the String.matches method. I'm new to lambdaj and feeling dumb since the examples given are more complicated than this.
wytten
  • 2,800
  • 1
  • 21
  • 38
2
votes
1 answer

Lambdaj class casting

i have some code like this: List back = new ArrayList(); for( ClassA classA : getClassAs() ) { if( classA instanceof ClassB ) { back.add((ClassB) classA); } } ClassB extends ClassA Is there some smart way to do…
mojoo-de
  • 501
  • 5
  • 20
2
votes
1 answer

lambdaj and Multiple Sort Conditions in Java

I love lambdaj and use it a lot, but I can't seem to figure out if it is possible to sort a list using multiple sort conditions. Here is an example using Google Collections. Can the same thing be done in lambdaj? Sorted first by color then by…
gobbler
  • 21
  • 1
  • 3
2
votes
1 answer

LambdaJ class property matcher

I am trying to write a Hamcrest matcher to verify the return value of a method that returns a Class object. For example, given the class: public static class ClassHolder { private final Class clazz; public ClassHolder(Class clazz) { …
Kkkev
  • 4,716
  • 5
  • 27
  • 43
2
votes
3 answers

find key with highest value in HashMap using lambdaj (java)

I try to find the find key having the hightest value in a HashMap < String,Double > using lambdaj. I guess selectMax() will help, but I don't know how to use it in this case.
Tom P.
  • 48
  • 1
  • 5
2
votes
2 answers

How do i combine a list of lists using lambdaj?

I want to be able to combine sublists into a single list using lambdaj. I have an iterative version that works: // HDU elements are children of each subsystem Collection subsystems = this.getAllSubsystems(); Set
retrodrone
  • 5,850
  • 9
  • 39
  • 65
2
votes
1 answer

A practical introduction to lambdaj?

lambdaj seems like a nice project. What practical steps are needed to start using it? How do I integrate it with my Maven project?
ripper234
  • 222,824
  • 274
  • 634
  • 905