@@ -0,0 +1,3303 @@
+/*%0A *  Copyright 2018 Alexey Andreev.%0A *%0A *  Licensed under the Apache License, Version 2.0 (the %22License%22);%0A *  you may not use this file except in compliance with the License.%0A *  You may obtain a copy of the License at%0A *%0A *       http://www.apache.org/licenses/LICENSE-2.0%0A *%0A *  Unless required by applicable law or agreed to in writing, software%0A *  distributed under the License is distributed on an %22AS IS%22 BASIS,%0A *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A *  See the License for the specific language governing permissions and%0A *  limitations under the License.%0A */%0Apackage org.teavm.classlib.java.util.concurrent.atomic;%0A%0Aimport java.io.Serializable;%0Aimport java.util.function.IntBinaryOperator;%0Aimport java.util.function.IntUnaryOperator;%0A%0Apublic class TAtomicInteger extends Number implements Serializable %7B%0A    private int value;%0A%0A    public TAtomicInteger() %7B%0A    %7D%0A%0A    public TAtomicInteger(int value) %7B%0A        this.value = value;%0A    %7D%0A%0A    public final int get() %7B%0A        return value;%0A    %7D%0A%0A    public final void set(int newValue) %7B%0A        value = newValue;%0A    %7D%0A%0A    public final void lazySet(int newValue) %7B%0A        value = newValue;%0A    %7D%0A%0A    public final int getAndSet(int newValue) %7B%0A        int result = value;%0A        value = newValue;%0A        return result;%0A    %7D%0A%0A    public final boolean compareAndSet(int expect, int update) %7B%0A        if (value != expect) %7B%0A            return false;%0A        %7D%0A        value = update;%0A        return true;%0A    %7D%0A%0A    public final boolean weakCompareAndSet(int expect, int update) %7B%0A        if (value != expect) %7B%0A            return false;%0A        %7D%0A        value = update;%0A        return true;%0A    %7D%0A%0A    public final int getAndIncrement() %7B%0A        return value++;%0A    %7D%0A%0A    public final int getAndDecrement() %7B%0A        return value--;%0A    %7D%0A%0A    public final int getAndAdd(int delta) %7B%0A        int result = value;%0A        value += delta;%0A        return result;%0A    %7D%0A%0A    public final int incrementAndGet() %7B%0A        return ++value;%0A    %7D%0A%0A    public final int decrementAndGet() %7B%0A        return --value;%0A    %7D%0A%0A    public final int addAndGet(int delta) %7B%0A        value += delta;%0A        return value;%0A    %7D%0A%0A    public final int getAndUpdate(IntUnaryOperator updateFunction) %7B%0A        int result = value;%0A        value = updateFunction.applyAsInt(value);%0A        return result;%0A    %7D%0A%0A    public final int updateAndGet(IntUnaryOperator updateFunction) %7B%0A        value = updateFunction.applyAsInt(value);%0A        return value;%0A    %7D%0A%0A    public final int getAndAccumulate(int x, IntBinaryOperator accumulatorFunction) %7B%0A        int result = value;%0A        value = accumulatorFunction.applyAsInt(value, x);%0A        return result;%0A    %7D%0A%0A    public final int accumulateAndGet(int x, IntBinaryOperator accumulatorFunction) %7B%0A        value = accumulatorFunction.applyAsInt(value, x);%0A        return value;%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return String.valueOf(value);%0A    %7D%0A%0A    @Override%0A    public int intValue() %7B%0A        return value;%0A    %7D%0A%0A    @Override%0A    public long longValue() %7B%0A        return value;%0A    %7D%0A%0A    @Override%0A    public float floatValue() %7B%0A        return value;%0A    %7D%0A%0A    @Override%0A    public double doubleValue() %7B%0A        return value;%0A    %7D%0A%7D%0A

Add AtomicInteger