- 授权协议: MIT
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: https://github.com/wkgcass/Style
- 软件文档: http://blog.cassite.net/JAVA/Style
- 官方下载: https://github.com/wkgcass/Style
软件介绍
Style 给 Java 8 带来其他语言高效的编程风格。
Style 通过精心挑选的方法/类名来模拟其他语言。
Style 致力于让你的编码更加美观,进行更少的重复编码,以及提升可读性。
代码示例:
// define a function to see if list contain a person with given name:
def<Boolean> check = $(
(List<Person> ls, String name) -> null != $(list).forEach(e -> {
if (e.name().equals(name))
return true;
return null;
}));
check.apply(list, "cass");
// If expression with return value:
System.out.println(If(
$(list).findOne(e -> e.name().equals("cass")),
res -> {
return res.id();
}).Else(() -> "Not Found!"));
// forEach with iterator info
$(list).forEach((e, i) -> System.out.println(
"Element is:" + e + " Index is:" + $(i)));
// dozens of new features waiting for you to explore.
