本文整理了Java中io.vavr.collection.List.reduce()
方法的一些代码示例,展示了List.reduce()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。List.reduce()
方法的具体详情如下:
包路径:io.vavr.collection.List
类名称:List
方法名:reduce
暂无
代码示例来源:origin: com.pragmaticobjects.oo.atom/atom-basis
@Override
public final void apply(final ClassPath classPath, final ClassNames classNames, final Path workingDirectory) {
final String cpString = classPath.paths()
.map(Object::toString)
.reduce((s1, s2) -> s1 + ":" + s2);
final ClassPathRepository classPathRepository = new ClassPathRepository(
new org.apache.bcel.util.ClassPath(
cpString
)
);
try {
for (String className : classNames.classNames()) {
final JavaClass javaClass = classPathRepository.loadClass(className);
final ClassGen classGen = new ClassGen(javaClass);
plugin.operateOn(classGen,javaClass, classPathRepository);
}
} catch(Exception ex) {
throw new RuntimeException(ex);
}
}
}
代码示例来源:origin: pivovarit/articles
@Override
public BinaryString decode(EncodedString input) {
EncodedString corrected = Match(indexesOfInvalidParityBits(input).isEmpty()).of(
Case($(true), () -> input),
Case($(false), () -> withBitFlippedAt(input, indexesOfInvalidParityBits(input).reduce((a, b) -> a + b) - 1))
);
return extractor.stripHammingMetadata(corrected);
}
内容来源于网络,如有侵权,请联系作者删除!