没有任何数据可供显示
开源项目社区 | 当前位置 : |
|
www.trustie.net/open_source_projects | 主页 > 开源项目社区 > logicalpractice-collections |
logicalpractice-collections
|
0 | 0 | 47 |
贡献者 | 讨论 | 代码提交 |
Inspired by the hamcrest library and the hamcrest-collections library, logicalpractice-collections attempts to implement a more flexiable and powerful collection tools.
Typed collect wrappers that hold and optionally enforce type safely of collections select, collect and remove functional methods The following syntax is (using this library perfectly valid java.
smiths = select(people, where(Person.class).getLastName(), equalToIgnoringCase("smith"));
// or using even more compact syntax
smiths = select(from(people).getLastName(), equalToIgnoringCase("smith"));// returns a list of firstNames, one item for each elemnet of 'people'
firstNames = collect(from(people).getFirstName());There are some very important limits to the use of these functions and it'd be a good idea to have a quick read before you go wading on in there.