*
|
Exemple
Liste de tous les éléments pairs d’une liste multiplié
par 2
final Predicate IS_PAIR = new IsPair();
final Function BY_2 = new By2();
Integer[] ints = {1, 2, 3, 4};
FluentIterable.from(ints)
.filter(IS_PAIR)
.transform(BY_2)
.toImmutableList();
=> {4,8}
www.xebia.fr | http://blog.xebia.fr | http://techtrends.xebia.fr
Telephone : 33 (0)1 53 89 99 99 | email :
[email protected] | 156 bd Haussmann - 75008 Paris