cdm/src/main/java/ucar/ma2/ArrayInt.java
static ArrayInt factory( Index index, boolean isUnsigned, int [] storage) {
    if (index instanceof Index0D) {
      return new ArrayInt.D0(index, isUnsigned, storage);
    } else if (index instanceof Index1D) {
      return new ArrayInt.D1(index, isUnsigned, storage);
    } else if (index instanceof Index2D) {
      return new ArrayInt.D2(index, isUnsigned, storage);
    } else if (index instanceof Index3D) {
      return new ArrayInt.D3(index, isUnsigned, storage);
    } else if (index instanceof Index4D) {
      return new ArrayInt.D4(index, isUnsigned, storage);
    } else if (index instanceof Index5D) {
      return new ArrayInt.D5(index, isUnsigned, storage);
    } else if (index instanceof Index6D) {
      return new ArrayInt.D6(index, isUnsigned, storage);
    } else if (index instanceof Index7D) {
      return new ArrayInt.D7(index, isUnsigned, storage);
    } else {
      return new ArrayInt(index, isUnsigned, storage);
    }
  }
static ArrayInt factory( Index index, boolean isUnsigned, int [] storage) {
    if (index instanceof Index0D) {
      return new ArrayInt.D0(index, isUnsigned, storage);
    } else if (index instanceof Index1D) {
      return new ArrayInt.D1(index, isUnsigned, storage);
    } else if (index instanceof Index2D) {
      return new ArrayInt.D2(index, isUnsigned, storage);
    } else if (index instanceof Index3D) {
      return new ArrayInt.D3(index, isUnsigned, storage);
    } else if (index instanceof Index4D) {
      return new ArrayInt.D4(index, isUnsigned, storage);
    } else if (index instanceof Index5D) {
      return new ArrayInt.D5(index, isUnsigned, storage);
    } else if (index instanceof Index6D) {
      return new ArrayInt.D6(index, isUnsigned, storage);
    } else if (index instanceof Index7D) {
      return new ArrayInt.D7(index, isUnsigned, storage);
    } else {
      return new ArrayInt(index, isUnsigned, storage);
    }
  }
/* create new ArrayInt with given indexImpl and backing store.
Should be private.
@param index use this Index
@param stor. use this storage. if null, allocate.
@return. new ArrayInt.D<rank> or ArrayInt object.