Advertisement
Guest User

Untitled

a guest
May 5th, 2015
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.47 KB | None | 0 0
  1. //use stream directly inside builder
  2. body.with(
  3.     div().withId("employees").with(
  4.             employees.stream().map(employee ->
  5.                             div().withClass("employee").with(
  6.                                     h2(employee.getName()),
  7.                                     img().withSrc(employee.getImgPath()),
  8.                                     p(employee.getTitle())
  9.                             )
  10.             ).collect(Collectors.toList())
  11.     )
  12. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement