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