@@ -0,0 +1,1709 @@
+/*%0A * Copyright 2012-2017 JetBrains s.r.o%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 java.util.concurrent.atomic;%0A%0Aimport java.io.Serializable;%0Aimport java.util.Objects;%0A%0A/**%0A * 'super-source'%0A * Partial implementation of java.util.concurrent.atomic.AtomicReference, which is missing in GWT emulator library.%0A * This way we can use AtomicReference class in GWT client code and in pure java.%0A * This implementation is not thread safe because browser js interpreters are single-threaded.%0A */%0A%0Apublic class AtomicReference%3CItemT%3E implements Serializable %7B%0A  private ItemT value;%0A%0A  public AtomicReference(ItemT initialValue) %7B%0A    value = initialValue;%0A  %7D%0A%0A  public AtomicReference() %7B%0A  %7D%0A%0A  public final ItemT get() %7B%0A    return value;%0A  %7D%0A%0A  public final void set(ItemT newValue) %7B%0A    value = newValue;%0A  %7D%0A%0A  public final boolean compareAndSet(ItemT expect, ItemT update) %7B%0A    if (Objects.equals(value, expect)) %7B%0A      value = update;%0A      return true;%0A    %7D%0A    return false;%0A  %7D%0A%0A  public final ItemT getAndSet(ItemT newValue) %7B%0A    ItemT current = this.value;%0A    value = newValue;%0A    return current;%0A  %7D%0A%0A  public String toString() %7B%0A    return String.valueOf(get());%0A  %7D%0A%7D

Add AtomicReference implementation for gwt (#165)