I hereby claim:
- I am amaembo on github.
- I am tagir_valeev (https://keybase.io/tagir_valeev) on keybase.
- I have a public key ASCH6kfJO8v94QIiMxjf6F-9bUZjiAGg5eoDfSUshwFNmAo
To claim this, I am signing this object:
| import java.util.*; | |
| class BreakHashSet { | |
| public static void main(String[] args) { | |
| Point[] points = new Point[20]; | |
| Arrays.setAll(points, idx -> new Point(idx * 500_000_000, | |
| -new Point(idx * 500_000_000, 0).hashCode())); | |
| Set<Point> set = new HashSet<>(Arrays.asList(points)); | |
| set.remove(points[1]); | |
| System.out.println(set.contains(points[14])); // Prints false! |
| import java.util.Collection; | |
| import java.util.Comparator; | |
| import java.util.PriorityQueue; | |
| import java.util.SortedSet; | |
| import java.util.TreeSet; | |
| import java.util.concurrent.PriorityBlockingQueue; | |
| public class WhoInheritsComparator { | |
| public static void main(String[] args) { | |
| SortedSet<Integer> c1 = new TreeSet<>(Comparator.reverseOrder()); |
| package com.com.example; | |
| import org.openjdk.jmh.annotations.Benchmark; | |
| import org.openjdk.jmh.annotations.BenchmarkMode; | |
| import org.openjdk.jmh.annotations.CompilerControl; | |
| import org.openjdk.jmh.annotations.Fork; | |
| import org.openjdk.jmh.annotations.Measurement; | |
| import org.openjdk.jmh.annotations.Mode; | |
| import org.openjdk.jmh.annotations.OutputTimeUnit; | |
| import org.openjdk.jmh.annotations.Param; |
| import java.lang.annotation.*; | |
| import java.lang.reflect.*; | |
| @Retention(RetentionPolicy.RUNTIME) | |
| @Target(ElementType.TYPE_USE) | |
| @interface TA { | |
| int value(); | |
| } | |
| public class MyClass { |
| import java.util.Arrays; | |
| import java.util.List; | |
| import java.util.Spliterator; | |
| import java.util.Spliterators; | |
| import java.util.function.BiFunction; | |
| import java.util.function.Consumer; | |
| import java.util.stream.Stream; | |
| import java.util.stream.StreamSupport; | |
| public class PairMapSample { |
| import java.lang.annotation.*; | |
| import java.lang.reflect.*; | |
| import java.util.Arrays; | |
| enum MyEnum { | |
| A(0.0, 0, ""); | |
| MyEnum(@Foo("double annotated") double d, | |
| int i, | |
| @Foo("string annotated") String s) { } |
| import java.util.*; | |
| @SuppressWarnings("ALL") | |
| class Test { | |
| static class ReifiedList<T> extends AbstractList<T> { | |
| private final List<T> delegate = new ArrayList<>(); | |
| private final Class<?> type; | |
| @SafeVarargs | |
| ReifiedList(@Deprecated T... unused) { |
| import java.util.concurrent.TimeUnit; | |
| public class AbstractEnumConverter<T extends Enum<T>> { | |
| private final Class<T> enumClass; | |
| private final T[] values; | |
| protected AbstractEnumConverter(Class<T> enumClass) { | |
| assert enumClass.isEnum(); | |
| this.enumClass = enumClass; | |
| this.values = enumClass.getEnumConstants(); |
| package com.soebes.performance.streams; | |
| import org.openjdk.jmh.annotations.*; | |
| import java.util.ArrayList; | |
| import java.util.Collections; | |
| import java.util.List; | |
| import java.util.concurrent.TimeUnit; | |
| import java.util.stream.Collectors; | |
| import java.util.stream.IntStream; |
I hereby claim:
To claim this, I am signing this object: