Skip to content
This repository was archived by the owner on Mar 10, 2025. It is now read-only.

tingstad/collections

Repository files navigation

⚠️ Inactive project ⚠️

Playing with a collections library which uses dynamic proxy objects to avoid loops and anonymous classes for common operations.

This enables a more declarative and functional programming style, perhaps useful for older versions of Java (5-7).

Lists.sort(persons).descendingBy().getFirstName();
int total = Lists.sum(persons).getAge();
int lower = Lists.minimum(persons).getAge();

List<Person> result = Pipe.from(list)
        .select(
                Condition.where(Pipe.item(list).getAge()).greaterThan(30)
                .or(Pipe.item(list).getName()).startsWith("T")
        )
        .sort(
                Order.by(Pipe.item(list).getName()).descending()
                .thenBy(Pipe.item(list).getAge()).nullsFirst()
        )
        .first(3);
        .toList();

About

Inactive. Experimental lib for Java 5-7

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages