This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| comments of blog post 'The Selector Pattern' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.IOException; | |
| import java.nio.file.Files; | |
| import java.nio.file.Path; | |
| import java.nio.file.Paths; | |
| import java.time.DayOfWeek; | |
| import java.time.LocalDate; | |
| import java.time.LocalDateTime; | |
| import java.time.temporal.Temporal; | |
| import java.util.ArrayList; | |
| import java.util.Arrays; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Slides of FOSDEM 2014 - Java Intrinsic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package java.lang.invoke; | |
| import java.io.IOException; | |
| import java.lang.invoke.MethodHandles.Lookup; | |
| import java.lang.reflect.InvocationTargetException; | |
| import java.lang.reflect.Method; | |
| import java.nio.channels.FileChannel; | |
| import sun.misc.Unsafe; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.OptionalLong; | |
| public class TimeStat { | |
| private long totalTime; | |
| private long recordCount; | |
| private long minimumTime; | |
| public void record(long elapsedTime) { | |
| totalTime += elapsedTime; | |
| minimumTime = (recordCount == 0)? elapsedTime: Math.min(minimumTime, elapsedTime); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import static java.util.Arrays.asList; | |
| import static java.util.Arrays.stream; | |
| import static java.util.stream.Collectors.joining; | |
| import static java.util.stream.Collectors.toCollection; | |
| import static java.util.stream.Collectors.toList; | |
| import static java.util.stream.IntStream.range; | |
| import static java.util.stream.Stream.concat; | |
| import static java.util.stream.Stream.of; | |
| import java.io.Console; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.Reader; | |
| import java.io.StringReader; | |
| import java.math.BigDecimal; | |
| import java.time.LocalDate; | |
| import java.util.Collections; | |
| import java.util.HashMap; | |
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.Objects; | |
| import java.util.Spliterator; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.ArrayList; | |
| import java.util.Arrays; | |
| import java.util.Iterator; | |
| import java.util.List; | |
| import java.util.Objects; | |
| import java.util.function.Function; | |
| import java.util.stream.Collectors; | |
| import java.util.stream.IntStream; | |
| import java.util.stream.Stream; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.lang.invoke.CallSite; | |
| import java.lang.invoke.ConstantCallSite; | |
| import java.lang.invoke.MethodHandle; | |
| import java.lang.invoke.MethodHandles; | |
| import java.lang.invoke.MethodHandles.Lookup; | |
| import java.lang.invoke.MethodType; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| import java.util.concurrent.atomic.AtomicInteger; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Random; | |
| import java.util.function.IntFunction; | |
| import java.util.stream.Collectors; | |
| public interface SayHi { | |
| public static void main(String[] args) { | |
| IntFunction<String> fun = s -> new Random(s) | |
| .ints(6, 0, 27) | |
| .filter(v -> v != 0) | |
| .mapToObj(v -> "" + (char)('`' + v)) |
OlderNewer