Skip to content

Instantly share code, notes, and snippets.

View tlinkowski's full-sized avatar

Tomasz Linkowski tlinkowski

View GitHub Profile
@tlinkowski
tlinkowski / Accumulative.java
Last active February 16, 2019 18:18
Accumulative: Custom Java Collectors Made Easy
/*
* Copyright 2019 Tomasz Linkowski.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@tlinkowski
tlinkowski / buildIntelliJModules.sh
Last active February 5, 2019 05:47
Generating IntelliJ IDEA modules for OpenJDK (Windows)
#!/bin/bash
#
# buildIntelliJModules.sh - generates the IntelliJ modules for JDK.
#
# Copyright (c) 2014, Will May <will.j.may@gmail.com> All rights reserved.
# Copyright (c) 2019, Tomasz Linkowski <t.linkowski@gmail.com> All rights reserved.
#
# Original source: https://github.com/AdoptOpenJDK/BuildHelpers/blob/master/buildIntelliJModules.sh
#
@tlinkowski
tlinkowski / ParallelStreamProblem.java
Created December 15, 2018 10:33
Problem with parallel stream - it parallelizes per batch not per item
import java.time.Duration;
import java.time.Instant;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;
/**
* @author Tomasz Linkowski
*/