Advertisement
dadragon84

Multipart stream

May 5th, 2023
859
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         if (state == null) return Collections.emptyList();
  2.         long k = rand.nextLong();
  3.         BitSet bitset = bitSetMap.computeIfAbsent(state, (s) -> IntStream.range(0, selectors.size()).filter((i) -> selectors.get(i).getLeft().test(s)).collect(BitSet::new, BitSet::set, BitSet::or));
  4.         return bitset.stream().mapToObj(selectors::get).map(Pair::getRight).map(model -> model.getQuads(state, side, new Random(k), data)).flatMap(List::stream).collect(Collectors.toList());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement