Nolix logo

a Java library for business and science

← Nolix containers

Tutorial: Containers

Get a subset of a LinkedList

LinkedList<Person> persons;
...
LinkedList<Person> seniors = persons.getRefSelected(p -> p.getAge() > 65);

Get some values from the elements of a LinkedList

LinkedList<Person> persons;
...
LinkedList<Integer> ages = persons.to(Person::getAge);

Get an average from the elements of LinkedList

LinkedLinked<Person> persons;
...
double averageAge = persons.getAverageByInt(Person::getAge);

Create a ReadContainer for an array

String[] namesArray;
...
ReadContainer<String> names = new ReadContainer<String>(namesArray);

Copyright © 2021 Silvan Wyss