// Path: gwt-typedarrays/src/main/java/org/gwtproject/typedarrays/shared/ArrayBuffer.java
// @JsType(isNative = true, name = "ArrayBuffer", namespace = JsPackage.GLOBAL)
// public interface ArrayBuffer {
// 
//   /**
//    * The length of the {@link ArrayBuffer} in bytes, which does not change.
//    *
//    * @return non-negative length
//    */
//   @JsProperty(name = "byteLength")
//   int byteLength();
// }
// 
// Path: gwt-typedarrays/src/main/java/org/gwtproject/typedarrays/shared/Uint32Array.java
// @JsType(isNative = true, name = "Uint32Array", namespace = JsPackage.GLOBAL)
// public interface Uint32Array extends ArrayBufferView {
// 
//   @JsOverlay int BYTES_PER_ELEMENT = 4;
// 
//   /**
//    * The length in elements of this view.
//    *
//    * @return non-negative length
//    */
//   @JsProperty(name = "length")
//   int length();
// 
//   /**
//    * Retrieve one element of this view.
//    *
//    * @param index the index within the array to read from
//    * @return the requested element
//    */
//   @JsOverlay
//   default long get(int index) {
//     return (long) getAsDouble(index);
//   }
//   /**
//    * Retrieve one element of this view.
//    *
//    * @param index the index within the array to read from
//    * @return the requested element as a double
//    */
//   @JsOverlay
//   default double getAsDouble(int index) {
//     return Js.<JsArrayLike<Double>>uncheckedCast(this).getAt(index);
//   }
// 
//   /**
//    * Set one element in this view.
//    *
//    * @param index the index within the array to write to
//    * @param value the value to write
//    */
//   @JsOverlay
//   default void set(int index, double value) {
//     Js.<JsArrayLike<Double>>uncheckedCast(this).setAt(index, value);
//   }
//   /**
//    * Set one element in this view.
//    *
//    * @param index the index within the array to write to
//    * @param value the value to write
//    */
//   @JsOverlay
//   default void set(int index, long value) {
//     set(index, (double) value);
//   }
//   /**
//    * Set multiple elements in this view from another view, storing starting at 0.
//    *
//    * @param array the values to write to this array
//    */
//   void set(Uint32Array array);
// 
//   /**
//    * Set multiple elements in this view from another view, storing starting at the requested offset.
//    *
//    * @param array the values to write to this array
//    */
//   void set(Uint32Array array, int offset);
// 
//   /**
//    * Set multiple elements in this view from an array, storing starting at 0.
//    *
//    * @param array the values to write to this array
//    */
//   @JsOverlay
//   default void set(long[] array) {
//     set(array, 0);
//   }
// 
//   /**
//    * Set multiple elements in this view from an array, storing starting at the requested offset.
//    *
//    * @param array the values to write to this array
//    */
//   @JsOverlay
//   default void set(long[] array, int offset) {
//     int len = array.length;
//     double[] temp = new double[len];
//     for (int i = 0; i < len; ++i) {
//       temp[i] = array[i];
//     }
//     set(temp, offset);
//   }
//   /**
//    * Set multiple elements in this view from an array, storing starting at 0.
//    *
//    * @param array the values to write to this array
//    */
//   void set(double[] array);
// 
//   /**
//    * Set multiple elements in this view from an array, storing starting at the requested offset.
//    *
//    * @param array the values to write to this array
//    */
//   void set(double[] array, int offset);
// 
//   /**
//    * Create a new view from the same array, from {@code offset} to the end of this view. These
//    * offset is clamped to legal indices into this view, so it is not an error to specify an invalid
//    * index.
//    *
//    * @param begin offset into this view if non-negative; if negative, an index from the end of this
//    *     view
//    * @return a new {@link Uint32Array} instance
//    */
//   Uint32Array subarray(int begin);
// 
//   /**
//    * Create a new view from the same array, from {@code offset} to (but not including) {@code end}
//    * in this view. These indices are clamped to legal indices into this view, so it is not an error
//    * to specify invalid indices.
//    *
//    * @param begin offset into this view if non-negative; if negative, an index from the end of this
//    *     view
//    * @param end offset into this view if non-negative; if negative, an index from the end of this
//    *     view
//    * @return a new {@link Uint32Array} instance
//    */
//   Uint32Array subarray(int begin, int end);
// }


import org.gwtproject.core.shared.GwtIncompatible;
import org.gwtproject.typedarrays.shared.ArrayBuffer;
import org.gwtproject.typedarrays.shared.Uint32Array;
  }

  @Override
  public void set(double[] array) {
    set(array, 0);
  }

  @Override
  public void set(double[] array, int offset) {
    int len = array.length;
    if (offset + len > length()) {
      throw new IndexOutOfBoundsException();
    }
    for (int i = 0; i < len; ++i) {
      set(offset++, array[i]);
    }
  }

  @Override
  public void set(int index, double value) {
    set(index, (long) value);
  }

  @Override
  public void set(int index, long value) {
    arrayBuf.setInt32(
        checkRange(index, BYTES_PER_ELEMENT), (int) (value & 0xFFFFFFFF), USE_LITTLE_ENDIAN);
  }

  @Override
// Path: gwt-typedarrays/src/main/java/org/gwtproject/typedarrays/shared/ArrayBuffer.java
// @JsType(isNative = true, name = "ArrayBuffer", namespace = JsPackage.GLOBAL)
// public interface ArrayBuffer {
// 
//   /**
//    * The length of the {@link ArrayBuffer} in bytes, which does not change.
//    *
//    * @return non-negative length
//    */
//   @JsProperty(name = "byteLength")
//   int byteLength();
// }
// 
// Path: gwt-typedarrays/src/main/java/org/gwtproject/typedarrays/shared/Uint32Array.java
// @JsType(isNative = true, name = "Uint32Array", namespace = JsPackage.GLOBAL)
// public interface Uint32Array extends ArrayBufferView {
// 
//   @JsOverlay int BYTES_PER_ELEMENT = 4;
// 
//   /**
//    * The length in elements of this view.
//    *
//    * @return non-negative length
//    */
//   @JsProperty(name = "length")
//   int length();
// 
//   /**
//    * Retrieve one element of this view.
//    *
//    * @param index the index within the array to read from
//    * @return the requested element
//    */
//   @JsOverlay
//   default long get(int index) {
//     return (long) getAsDouble(index);
//   }
//   /**
//    * Retrieve one element of this view.
//    *
//    * @param index the index within the array to read from
//    * @return the requested element as a double
//    */
//   @JsOverlay
//   default double getAsDouble(int index) {
//     return Js.<JsArrayLike<Double>>uncheckedCast(this).getAt(index);
//   }
// 
//   /**
//    * Set one element in this view.
//    *
//    * @param index the index within the array to write to
//    * @param value the value to write
//    */
//   @JsOverlay
//   default void set(int index, double value) {
//     Js.<JsArrayLike<Double>>uncheckedCast(this).setAt(index, value);
//   }
//   /**
//    * Set one element in this view.
//    *
//    * @param index the index within the array to write to
//    * @param value the value to write
//    */
//   @JsOverlay
//   default void set(int index, long value) {
//     set(index, (double) value);
//   }
//   /**
//    * Set multiple elements in this view from another view, storing starting at 0.
//    *
//    * @param array the values to write to this array
//    */
//   void set(Uint32Array array);
// 
//   /**
//    * Set multiple elements in this view from another view, storing starting at the requested offset.
//    *
//    * @param array the values to write to this array
//    */
//   void set(Uint32Array array, int offset);
// 
//   /**
//    * Set multiple elements in this view from an array, storing starting at 0.
//    *
//    * @param array the values to write to this array
//    */
//   @JsOverlay
//   default void set(long[] array) {
//     set(array, 0);
//   }
// 
//   /**
//    * Set multiple elements in this view from an array, storing starting at the requested offset.
//    *
//    * @param array the values to write to this array
//    */
//   @JsOverlay
//   default void set(long[] array, int offset) {
//     int len = array.length;
//     double[] temp = new double[len];
//     for (int i = 0; i < len; ++i) {
//       temp[i] = array[i];
//     }
//     set(temp, offset);
//   }
//   /**
//    * Set multiple elements in this view from an array, storing starting at 0.
//    *
//    * @param array the values to write to this array
//    */
//   void set(double[] array);
// 
//   /**
//    * Set multiple elements in this view from an array, storing starting at the requested offset.
//    *
//    * @param array the values to write to this array
//    */
//   void set(double[] array, int offset);
// 
//   /**
//    * Create a new view from the same array, from {@code offset} to the end of this view. These
//    * offset is clamped to legal indices into this view, so it is not an error to specify an invalid
//    * index.
//    *
//    * @param begin offset into this view if non-negative; if negative, an index from the end of this
//    *     view
//    * @return a new {@link Uint32Array} instance
//    */
//   Uint32Array subarray(int begin);
// 
//   /**
//    * Create a new view from the same array, from {@code offset} to (but not including) {@code end}
//    * in this view. These indices are clamped to legal indices into this view, so it is not an error
//    * to specify invalid indices.
//    *
//    * @param begin offset into this view if non-negative; if negative, an index from the end of this
//    *     view
//    * @param end offset into this view if non-negative; if negative, an index from the end of this
//    *     view
//    * @return a new {@link Uint32Array} instance
//    */
//   Uint32Array subarray(int begin, int end);
// }


// Path: gwt-typedarrays/src/main/java/org/gwtproject/typedarrays/server/Uint32ArrayImpl.java
import org.gwtproject.core.shared.GwtIncompatible;
import org.gwtproject.typedarrays.shared.ArrayBuffer;
import org.gwtproject.typedarrays.shared.Uint32Array;

  }

  @Override
  public void set(double[] array) {
    set(array, 0);
  }

  @Override
  public void set(double[] array, int offset) {
    int len = array.length;
    if (offset + len > length()) {
      throw new IndexOutOfBoundsException();
    }
    for (int i = 0; i < len; ++i) {
      set(offset++, array[i]);
    }
  }

  @Override
  public void set(int index, double value) {
    set(index, (long) value);
  }

  @Override
  public void set(int index, long value) {
    arrayBuf.setInt32(
        checkRange(index, BYTES_PER_ELEMENT), (int) (value & 0xFFFFFFFF), USE_LITTLE_ENDIAN);
  }

  @Override
  public void set(long[] array) {