/*
 *  Copyright 2020 konsoletyper.
 *
 *  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
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package org.teavm.classlib.java.util.concurrent;

import java.util.Random;

public class TThreadLocalRandom extends Random {
    private static final TThreadLocalRandom current = new TThreadLocalRandom();

    private TThreadLocalRandom() {
    }

    public static TThreadLocalRandom current() {
        return current;
    }

    @Override
    public synchronized void setSeed(long seed) {
        throw new UnsupportedOperationException();
    }
}

@@ -958,21 +958,8 @@
 lic 
-synchronized 
 void
@@ -1028,16 +1028,1811 @@
 ception(
+);%0A    %7D%0A%0A    public int nextInt(int origin, int bound) %7B%0A        if (origin %3E= bound) %7B%0A            throw new IllegalArgumentException();%0A        %7D%0A        int range = bound - origin;%0A        if (range %3C 0) %7B%0A            return nextInt(bound - origin) + origin;%0A        %7D else %7B%0A            while (true) %7B%0A                int value = nextInt();%0A                if (value %3E= origin && value %3C bound) %7B%0A                    return value;%0A                %7D%0A            %7D%0A        %7D%0A    %7D%0A%0A    public long nextLong(long bound) %7B%0A        if (bound %3C= 0) %7B%0A            throw new IllegalArgumentException();%0A        %7D%0A        while (true) %7B%0A            long value = nextLong();%0A            long result = value %25 bound;%0A            if (value - result + (bound - 1) %3C 0) %7B%0A                return result;%0A            %7D%0A        %7D%0A    %7D%0A%0A    public long nextLong(long origin, long bound) %7B%0A        if (origin %3E= bound) %7B%0A            throw new IllegalArgumentException();%0A        %7D%0A        long range = bound - origin;%0A        if (range %3C 0) %7B%0A            return nextLong(bound - origin) + origin;%0A        %7D else %7B%0A            while (true) %7B%0A                long value = nextLong();%0A                if (value %3E= origin && value %3C bound) %7B%0A                    return value;%0A                %7D%0A            %7D%0A        %7D%0A    %7D%0A%0A    public double nextDouble(double bound) %7B%0A        if (bound %3C= 0) %7B%0A            throw new IllegalArgumentException();%0A        %7D%0A        double value = nextDouble() * bound;%0A        if (value == bound) %7B%0A            value = Math.nextDown(value);%0A        %7D%0A        return value;%0A    %7D%0A%0A    public double nextDouble(double origin, double bound) %7B%0A        if (origin %3E= bound) %7B%0A            throw new IllegalArgumentException();%0A        %7D%0A        return origin + nextDouble(bound - origin
 );%0A    %7D

Implement some of the missing methods in ThreadLocalRandom