本文整理了Java中ch.lambdaj.Lambda.flatten()
方法的一些代码示例,展示了Lambda.flatten()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Lambda.flatten()
方法的具体详情如下:
包路径:ch.lambdaj.Lambda
类名称:Lambda
方法名:flatten
[英]Flattens the given iterable by recursively descending through its nested Collections and create a flat List of all of the leaves. This method also works with Maps (by collecting their values) and arrays.
[中]通过递归递减嵌套集合来展平给定的iterable,并创建所有叶的平面列表。此方法也适用于贴图(通过收集其值)和数组。
代码示例来源:origin: net.thucydides/thucydides-jbehave
public List<TestOutcome> getAllTestOutcomes() {
return flatten(extract(baseStepListeners, on(BaseStepListener.class).getTestOutcomes()));
}
代码示例来源:origin: org.motechproject/motech-mobileforms-api
List<FormBean> allForms = flatten(collect(studies, on(Study.class).forms()));
for (Study study : studies) {
for (FormBeanGroup group : study.groupedForms()) {
代码示例来源:origin: net.serenity-bdd/core
public List<ScreenshotAndHtmlSource> getScreenshotAndHtmlSources() {
List<TestStep> testStepsWithScreenshots = select(getFlattenedTestSteps(),
having(on(TestStep.class).needsScreenshots()));
return flatten(extract(testStepsWithScreenshots, on(TestStep.class).getScreenshots()));
}
代码示例来源:origin: net.thucydides/thucydides-core
public List<ScreenshotAndHtmlSource> getScreenshotAndHtmlSources() {
List<TestStep> testStepsWithScreenshots = select(getFlattenedTestSteps(),
having(on(TestStep.class).needsScreenshots()));
return flatten(extract(testStepsWithScreenshots, on(TestStep.class).getScreenshots()));
}
内容来源于网络,如有侵权,请联系作者删除!