Skip to content

feast107/Linq-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linq-java

Collaborate with Manifold

Example

In TestMain.java

List<E> list = new ArrayList<E>() //List<E>
list
    .aggregate(temp,(s,i)->{ System.out.println(i); return list; })
    .distinct()
    .distinctBy(x->x.propMayReduce)
    .orderBy(x->x.comparableProp)
    .orderByDescending(x->x.comparableProp)
    .where(x->x.comparableProp > 3)
    .select(x->x.anotherProp)
    .find(x->x.comparableProp == 3)
    .toMap(x->x.keyProp,x->x.valueProp);
list.all(x->x.comparableProp > 0)
    ? list.any(x->x.comparableProp < 5)
    : list.findIndex(x->x.comparableProp > 5) > 0;