This is an automated email from the ASF dual-hosted git repository.

jsorel pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git


The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
     new db9b5d4b64 feat(Geometry): prepare ArrayFactory interface to support 
Java or FFM allocation
db9b5d4b64 is described below

commit db9b5d4b649aa1e1a25d3b128bb44744731a2f21
Author: jsorel <[email protected]>
AuthorDate: Thu Feb 12 08:56:42 2026 +0100

    feat(Geometry): prepare ArrayFactory interface to support Java or FFM 
allocation
---
 .../main/org/apache/sis/geometries/math/Array.java |   5 +
 .../sis/geometries/math/ArrayConcatenated.java     |   5 +
 .../apache/sis/geometries/math/ArrayFactory.java   | 113 ++++++++++++++++++++
 .../sis/geometries/math/ArrayUnmodifiable.java     |   5 +
 .../math/{ArrayMemory.java => JavaFactory.java}    | 115 +++++++++++++++++++--
 .../org/apache/sis/geometries/math/NDArrays.java   |  61 ++++++-----
 .../apache/sis/geometries/math/ArrayNbTest.java    |   2 +-
 .../apache/sis/geometries/math/ArrayNdTest.java    |   2 +-
 .../apache/sis/geometries/math/ArrayNfTest.java    |   2 +-
 .../apache/sis/geometries/math/ArrayNiTest.java    |   2 +-
 .../apache/sis/geometries/math/ArrayNlTest.java    |   2 +-
 .../apache/sis/geometries/math/ArrayNsTest.java    |   2 +-
 .../apache/sis/geometries/math/ArrayNubTest.java   |   2 +-
 .../apache/sis/geometries/math/ArrayNuiTest.java   |   2 +-
 .../apache/sis/geometries/math/ArrayNusTest.java   |   2 +-
 15 files changed, 275 insertions(+), 47 deletions(-)

diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/Array.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/Array.java
index c779bf5075..35735d8226 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/Array.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/Array.java
@@ -33,6 +33,11 @@ import org.apache.sis.util.ArgumentChecks;
  */
 public interface Array extends NDArray {
 
+    /**
+     * @return the factory which created this array.
+     */
+    ArrayFactory getFactory();
+
     /**
      * @return if length is zero.
      */
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/ArrayConcatenated.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/ArrayConcatenated.java
index 9ecd11deb0..6c5f89a15e 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/ArrayConcatenated.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/ArrayConcatenated.java
@@ -52,6 +52,11 @@ final class ArrayConcatenated extends AbstractArray {
         this.length = offsets[offsets.length - 1] + arrays[arrays.length - 
1].getLength();
     }
 
+    @Override
+    public ArrayFactory getFactory() {
+        return arrays[0].getFactory();
+    }
+
     @Override
     public SampleSystem getSampleSystem() {
         return arrays[0].getSampleSystem();
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/ArrayFactory.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/ArrayFactory.java
new file mode 100644
index 0000000000..59abc4f4e3
--- /dev/null
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/ArrayFactory.java
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.geometries.math;
+
+import java.lang.foreign.SegmentAllocator;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+
+/**
+ * Factory to create new arrays of different types.
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public interface ArrayFactory {
+
+    public static final ArrayFactory JAVA = JavaFactory.INSTANCE;
+
+    public static ArrayFactory newFFMFactory(SegmentAllocator allocator) {
+        throw new UnsupportedOperationException();
+    }
+
+
+    Builder builder();
+
+    public static interface Builder {
+
+        /**
+         * Set the array shape.
+         *
+         * @param shape
+         * @return this builder
+         */
+        Builder shape(long ... shape);
+
+        /**
+         * Set the array system.
+         *
+         * @param crs
+         * @return this builder
+         */
+        default Builder system(CoordinateReferenceSystem crs) {
+            return system(SampleSystem.of(crs));
+        }
+
+        /**
+         * Set the array system.
+         *
+         * @param system
+         * @return this builder
+         */
+        Builder system(SampleSystem system);
+
+        /**
+         * Set array datatype.
+         *
+         * @param type
+         * @return this builder
+         */
+        Builder dataType(DataType type);
+
+        /**
+         * Set the initial array values to the given values.
+         *
+         * @param values, can be any java array type, or a Iterable<Tuple> or 
a ByteBuffer
+         * @return
+         */
+        Builder values(Object values);
+
+        /**
+         * Set the initial array values to the given value.
+         * Value will be duplicated to fill the array.
+         *
+         * @param values, can be any java array type, or a Iterable<Tuple> or 
a ByteBuffer
+         * @return this builder
+         */
+        Builder fill(Object values);
+
+        /**
+         * Create the ND array.
+         * If datatype is not set the type will be infered from the values if 
they are defined.
+         * If shape is not set the type will be infered from the values if 
they are defined.
+         * If samplesystem is not set, an undefined one will be used.
+         *
+         * @return NDArray
+         * @throws IllegalArgumentException if parameters are incorrect.
+         */
+        NDArray buildND();
+
+        /**
+         * Create the array.
+         *
+         * @return Array
+         * @throws IllegalArgumentException if parameters are incorrect.
+         * @see #buildND()
+         */
+        Array build();
+
+    }
+
+}
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/ArrayUnmodifiable.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/ArrayUnmodifiable.java
index 09b0573ce4..81451a3c1b 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/ArrayUnmodifiable.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/ArrayUnmodifiable.java
@@ -37,6 +37,11 @@ final class ArrayUnmodifiable extends AbstractArray {
         this.parent = parent;
     }
 
+    @Override
+    public ArrayFactory getFactory() {
+        return parent.getFactory();
+    }
+
     @Override
     public SampleSystem getSampleSystem() {
         return parent.getSampleSystem();
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/ArrayMemory.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/JavaFactory.java
similarity index 95%
rename from 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/ArrayMemory.java
rename to 
incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/JavaFactory.java
index 4ecc042ae4..c272434aca 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/ArrayMemory.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/JavaFactory.java
@@ -26,9 +26,59 @@ import org.apache.sis.util.ArgumentChecks;
  *
  * @author Johann Sorel (Geomatys)
  */
-public abstract class ArrayMemory extends AbstractArray {
+public final class JavaFactory implements ArrayFactory {
 
-    static final class Byte extends ArrayMemory {
+    public static final JavaFactory INSTANCE = new JavaFactory();
+
+    private JavaFactory() {
+    }
+
+    @Override
+    public Builder builder() {
+        return new JavaBuilder();
+    }
+
+    private static final class JavaBuilder implements Builder {
+
+        @Override
+        public Builder shape(long... shape) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public Builder system(SampleSystem system) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public Builder dataType(DataType type) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public Builder values(Object values) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public Builder fill(Object values) {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public NDArray buildND() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+        @Override
+        public Array build() {
+            throw new UnsupportedOperationException("Not supported yet.");
+        }
+
+    }
+
+
+    static final class Byte extends AbstractArray {
 
         private SampleSystem type;
         private final int dimension;
@@ -43,6 +93,11 @@ public abstract class ArrayMemory extends AbstractArray {
             }
         }
 
+        @Override
+        public ArrayFactory getFactory() {
+            return JavaFactory.INSTANCE;
+        }
+
         @Override
         public SampleSystem getSampleSystem() {
             return type;
@@ -202,7 +257,7 @@ public abstract class ArrayMemory extends AbstractArray {
 
     }
 
-    static final class UByte extends ArrayMemory {
+    static final class UByte extends AbstractArray {
 
         private SampleSystem type;
         private final int dimension;
@@ -217,6 +272,11 @@ public abstract class ArrayMemory extends AbstractArray {
             }
         }
 
+        @Override
+        public ArrayFactory getFactory() {
+            return JavaFactory.INSTANCE;
+        }
+
         @Override
         public SampleSystem getSampleSystem() {
             return type;
@@ -376,7 +436,7 @@ public abstract class ArrayMemory extends AbstractArray {
 
     }
 
-    static final class Short extends ArrayMemory {
+    static final class Short extends AbstractArray {
 
         private SampleSystem type;
         private final int dimension;
@@ -391,6 +451,11 @@ public abstract class ArrayMemory extends AbstractArray {
             }
         }
 
+        @Override
+        public ArrayFactory getFactory() {
+            return JavaFactory.INSTANCE;
+        }
+
         @Override
         public SampleSystem getSampleSystem() {
             return type;
@@ -559,7 +624,7 @@ public abstract class ArrayMemory extends AbstractArray {
 
     }
 
-    static final class UShort extends ArrayMemory {
+    static final class UShort extends AbstractArray {
 
         private SampleSystem type;
         private final int dimension;
@@ -574,6 +639,11 @@ public abstract class ArrayMemory extends AbstractArray {
             }
         }
 
+        @Override
+        public ArrayFactory getFactory() {
+            return JavaFactory.INSTANCE;
+        }
+
         @Override
         public SampleSystem getSampleSystem() {
             return type;
@@ -734,7 +804,7 @@ public abstract class ArrayMemory extends AbstractArray {
 
     }
 
-    static final class Int extends ArrayMemory {
+    static final class Int extends AbstractArray {
 
         private SampleSystem type;
         private final int dimension;
@@ -749,6 +819,11 @@ public abstract class ArrayMemory extends AbstractArray {
             }
         }
 
+        @Override
+        public ArrayFactory getFactory() {
+            return JavaFactory.INSTANCE;
+        }
+
         @Override
         public SampleSystem getSampleSystem() {
             return type;
@@ -907,7 +982,7 @@ public abstract class ArrayMemory extends AbstractArray {
         }
     }
 
-    static final class UInt extends ArrayMemory {
+    static final class UInt extends AbstractArray {
 
         private SampleSystem type;
         private final int dimension;
@@ -931,6 +1006,11 @@ public abstract class ArrayMemory extends AbstractArray {
             }
         }
 
+        @Override
+        public ArrayFactory getFactory() {
+            return JavaFactory.INSTANCE;
+        }
+
         @Override
         public SampleSystem getSampleSystem() {
             return type;
@@ -1090,7 +1170,7 @@ public abstract class ArrayMemory extends AbstractArray {
         }
     }
 
-    static final class Long extends ArrayMemory {
+    static final class Long extends AbstractArray {
 
         private SampleSystem type;
         private final int dimension;
@@ -1105,6 +1185,11 @@ public abstract class ArrayMemory extends AbstractArray {
             }
         }
 
+        @Override
+        public ArrayFactory getFactory() {
+            return JavaFactory.INSTANCE;
+        }
+
         @Override
         public SampleSystem getSampleSystem() {
             return type;
@@ -1252,7 +1337,7 @@ public abstract class ArrayMemory extends AbstractArray {
         }
     }
 
-    static final class Float extends ArrayMemory {
+    static final class Float extends AbstractArray {
 
         private SampleSystem type;
         private final int dimension;
@@ -1267,6 +1352,11 @@ public abstract class ArrayMemory extends AbstractArray {
             }
         }
 
+        @Override
+        public ArrayFactory getFactory() {
+            return JavaFactory.INSTANCE;
+        }
+
         @Override
         public SampleSystem getSampleSystem() {
             return type;
@@ -1431,7 +1521,7 @@ public abstract class ArrayMemory extends AbstractArray {
         }
     }
 
-    static final class Double extends ArrayMemory {
+    static final class Double extends AbstractArray {
 
         private SampleSystem type;
         private final int dimension;
@@ -1446,6 +1536,11 @@ public abstract class ArrayMemory extends AbstractArray {
             }
         }
 
+        @Override
+        public ArrayFactory getFactory() {
+            return JavaFactory.INSTANCE;
+        }
+
         @Override
         public SampleSystem getSampleSystem() {
             return type;
diff --git 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/NDArrays.java
 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/NDArrays.java
index 02a5599411..0098795e70 100644
--- 
a/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/NDArrays.java
+++ 
b/incubator/src/org.apache.sis.geometry/main/org/apache/sis/geometries/math/NDArrays.java
@@ -47,15 +47,15 @@ public final class NDArrays {
         final int dimension = type.getSize();
         final Array array;
         switch (dataType) {
-            case BYTE : array = new ArrayMemory.Byte(type, new 
byte[vectors.size() * dimension]); break;
-            case UBYTE : array = new ArrayMemory.UByte(type, new 
byte[vectors.size() * dimension]); break;
-            case SHORT : array = new ArrayMemory.Short(type, new 
short[vectors.size() * dimension]); break;
-            case USHORT : array = new ArrayMemory.UShort(type, new 
short[vectors.size() * dimension]); break;
-            case INT : array = new ArrayMemory.Int(type, new 
int[vectors.size() * dimension]); break;
-            case UINT : array = new ArrayMemory.UInt(type, new 
int[vectors.size() * dimension]); break;
-            case LONG : array = new ArrayMemory.Long(type, new 
long[vectors.size() * dimension]); break;
-            case FLOAT : array = new ArrayMemory.Float(type, new 
float[vectors.size() * dimension]); break;
-            case DOUBLE : array = new ArrayMemory.Double(type, new 
double[vectors.size() * dimension]); break;
+            case BYTE : array = new JavaFactory.Byte(type, new 
byte[vectors.size() * dimension]); break;
+            case UBYTE : array = new JavaFactory.UByte(type, new 
byte[vectors.size() * dimension]); break;
+            case SHORT : array = new JavaFactory.Short(type, new 
short[vectors.size() * dimension]); break;
+            case USHORT : array = new JavaFactory.UShort(type, new 
short[vectors.size() * dimension]); break;
+            case INT : array = new JavaFactory.Int(type, new 
int[vectors.size() * dimension]); break;
+            case UINT : array = new JavaFactory.UInt(type, new 
int[vectors.size() * dimension]); break;
+            case LONG : array = new JavaFactory.Long(type, new 
long[vectors.size() * dimension]); break;
+            case FLOAT : array = new JavaFactory.Float(type, new 
float[vectors.size() * dimension]); break;
+            case DOUBLE : array = new JavaFactory.Double(type, new 
double[vectors.size() * dimension]); break;
             default : throw new IllegalArgumentException("Unexpected data type 
" + dataType);
         }
 
@@ -72,15 +72,15 @@ public final class NDArrays {
         final int isize = Math.toIntExact(size);
         final Array array;
         switch (dataType) {
-            case BYTE : array = new ArrayMemory.Byte(type, new byte[isize]); 
break;
-            case UBYTE : array = new ArrayMemory.UByte(type, new byte[isize]); 
break;
-            case SHORT : array = new ArrayMemory.Short(type, new 
short[isize]); break;
-            case USHORT : array = new ArrayMemory.UShort(type, new 
short[isize]); break;
-            case INT : array = new ArrayMemory.Int(type, new int[isize]); 
break;
-            case UINT : array = new ArrayMemory.UInt(type, new int[isize]); 
break;
-            case LONG : array = new ArrayMemory.Long(type, new long[isize]); 
break;
-            case FLOAT : array = new ArrayMemory.Float(type, new 
float[isize]); break;
-            case DOUBLE : array = new ArrayMemory.Double(type, new 
double[isize]); break;
+            case BYTE : array = new JavaFactory.Byte(type, new byte[isize]); 
break;
+            case UBYTE : array = new JavaFactory.UByte(type, new byte[isize]); 
break;
+            case SHORT : array = new JavaFactory.Short(type, new 
short[isize]); break;
+            case USHORT : array = new JavaFactory.UShort(type, new 
short[isize]); break;
+            case INT : array = new JavaFactory.Int(type, new int[isize]); 
break;
+            case UINT : array = new JavaFactory.UInt(type, new int[isize]); 
break;
+            case LONG : array = new JavaFactory.Long(type, new long[isize]); 
break;
+            case FLOAT : array = new JavaFactory.Float(type, new 
float[isize]); break;
+            case DOUBLE : array = new JavaFactory.Double(type, new 
double[isize]); break;
             default : throw new IllegalArgumentException("Unexpected data type 
" + dataType);
         }
         return array;
@@ -131,7 +131,7 @@ public final class NDArrays {
     }
 
     public static Array of(SampleSystem type, byte ... values) {
-        return new ArrayMemory.Byte(type, values);
+        return new JavaFactory.Byte(type, values);
     }
 
     public static Array of(CoordinateReferenceSystem crs, int ... values) {
@@ -139,7 +139,7 @@ public final class NDArrays {
     }
 
     public static Array of(SampleSystem type, int ... values) {
-        return new ArrayMemory.Int(type, values);
+        return new JavaFactory.Int(type, values);
     }
 
     public static Array of(CoordinateReferenceSystem crs, short ... values) {
@@ -147,7 +147,7 @@ public final class NDArrays {
     }
 
     public static Array of(SampleSystem type, short ... values) {
-        return new ArrayMemory.Short(type, values);
+        return new JavaFactory.Short(type, values);
     }
 
     public static Array of(CoordinateReferenceSystem crs, long ... values) {
@@ -155,7 +155,7 @@ public final class NDArrays {
     }
 
     public static Array of(SampleSystem type, long ... values) {
-        return new ArrayMemory.Long(type, values);
+        return new JavaFactory.Long(type, values);
     }
 
     public static Array of(CoordinateReferenceSystem crs, float ... values) {
@@ -163,7 +163,7 @@ public final class NDArrays {
     }
 
     public static Array of(SampleSystem type, float ... values) {
-        return new ArrayMemory.Float(type, values);
+        return new JavaFactory.Float(type, values);
     }
 
     public static Array of(CoordinateReferenceSystem crs, double ... values) {
@@ -171,23 +171,23 @@ public final class NDArrays {
     }
 
     public static Array of(SampleSystem type, double ... values) {
-        return new ArrayMemory.Double(type, values);
+        return new JavaFactory.Double(type, values);
     }
 
     public static Array ofUnsigned(SampleSystem type, byte ... values) {
-        return new ArrayMemory.UByte(type, values);
+        return new JavaFactory.UByte(type, values);
     }
 
     public static Array ofUnsigned(SampleSystem type, short ... values) {
-        return new ArrayMemory.UShort(type, values);
+        return new JavaFactory.UShort(type, values);
     }
 
     public static Array ofUnsigned(SampleSystem type, int ... values) {
-        return new ArrayMemory.UInt(type, values);
+        return new JavaFactory.UInt(type, values);
     }
 
     public static Array ofUnsigned(SampleSystem type, List<Integer> values) {
-        return new ArrayMemory.UInt(type, values);
+        return new JavaFactory.UInt(type, values);
     }
 
     /**
@@ -519,6 +519,11 @@ public final class NDArrays {
             this.index = index;
         }
 
+        @Override
+        public ArrayFactory getFactory() {
+            return base.getFactory();
+        }
+
         @Override
         public long getLength() {
             return index.length;
diff --git 
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNbTest.java
 
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNbTest.java
index 458250e064..6bda898aae 100644
--- 
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNbTest.java
+++ 
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNbTest.java
@@ -30,7 +30,7 @@ public class ArrayNbTest extends AbstractArrayTest {
 
     @Override
     protected Array create(int dim, int length) {
-        return new ArrayMemory.Byte(SampleSystem.ofSize(dim), new 
byte[length*dim]);
+        return new JavaFactory.Byte(SampleSystem.ofSize(dim), new 
byte[length*dim]);
     }
 
 }
diff --git 
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNdTest.java
 
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNdTest.java
index 47beb5dd5d..b9e0b15f73 100644
--- 
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNdTest.java
+++ 
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNdTest.java
@@ -30,7 +30,7 @@ public class ArrayNdTest extends AbstractArrayTest {
 
     @Override
     protected Array create(int dim, int length) {
-        return new ArrayMemory.Double(SampleSystem.ofSize(dim), new 
double[length*dim]);
+        return new JavaFactory.Double(SampleSystem.ofSize(dim), new 
double[length*dim]);
     }
 
 }
diff --git 
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNfTest.java
 
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNfTest.java
index 9936ac297a..ec2a786779 100644
--- 
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNfTest.java
+++ 
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNfTest.java
@@ -30,7 +30,7 @@ public class ArrayNfTest extends AbstractArrayTest {
 
     @Override
     protected Array create(int dim, int length) {
-        return new ArrayMemory.Float(SampleSystem.ofSize(dim), new 
float[length*dim]);
+        return new JavaFactory.Float(SampleSystem.ofSize(dim), new 
float[length*dim]);
     }
 
 }
diff --git 
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNiTest.java
 
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNiTest.java
index 65fa9ba072..c18a32e5ea 100644
--- 
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNiTest.java
+++ 
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNiTest.java
@@ -30,7 +30,7 @@ public class ArrayNiTest extends AbstractArrayTest {
 
     @Override
     protected Array create(int dim, int length) {
-        return new ArrayMemory.Int(SampleSystem.ofSize(dim), new 
int[length*dim]);
+        return new JavaFactory.Int(SampleSystem.ofSize(dim), new 
int[length*dim]);
     }
 
 }
diff --git 
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNlTest.java
 
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNlTest.java
index 511477cca8..f813c88cc4 100644
--- 
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNlTest.java
+++ 
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNlTest.java
@@ -30,7 +30,7 @@ public class ArrayNlTest extends AbstractArrayTest {
 
     @Override
     protected Array create(int dim, int length) {
-        return new ArrayMemory.Long(SampleSystem.ofSize(dim), new 
long[length*dim]);
+        return new JavaFactory.Long(SampleSystem.ofSize(dim), new 
long[length*dim]);
     }
 
 }
diff --git 
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNsTest.java
 
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNsTest.java
index 7e5d3a6db0..0fb4ec4e41 100644
--- 
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNsTest.java
+++ 
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNsTest.java
@@ -30,7 +30,7 @@ public class ArrayNsTest extends AbstractArrayTest {
 
     @Override
     protected Array create(int dim, int length) {
-        return new ArrayMemory.Short(SampleSystem.ofSize(dim), new 
short[length*dim]);
+        return new JavaFactory.Short(SampleSystem.ofSize(dim), new 
short[length*dim]);
     }
 
 }
diff --git 
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNubTest.java
 
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNubTest.java
index 9805936b90..21549b339c 100644
--- 
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNubTest.java
+++ 
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNubTest.java
@@ -30,7 +30,7 @@ public class ArrayNubTest extends AbstractArrayTest {
 
     @Override
     protected Array create(int dim, int length) {
-        return new ArrayMemory.UByte(SampleSystem.ofSize(dim), new 
byte[length*dim]);
+        return new JavaFactory.UByte(SampleSystem.ofSize(dim), new 
byte[length*dim]);
     }
 
 }
diff --git 
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNuiTest.java
 
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNuiTest.java
index 19f875624d..024100c989 100644
--- 
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNuiTest.java
+++ 
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNuiTest.java
@@ -30,7 +30,7 @@ public class ArrayNuiTest extends AbstractArrayTest {
 
     @Override
     protected Array create(int dim, int length) {
-        return new ArrayMemory.UInt(SampleSystem.ofSize(dim), new 
int[length*dim]);
+        return new JavaFactory.UInt(SampleSystem.ofSize(dim), new 
int[length*dim]);
     }
 
 }
diff --git 
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNusTest.java
 
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNusTest.java
index 8569d75b3a..5baae69523 100644
--- 
a/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNusTest.java
+++ 
b/incubator/src/org.apache.sis.geometry/test/org/apache/sis/geometries/math/ArrayNusTest.java
@@ -30,7 +30,7 @@ public class ArrayNusTest extends AbstractArrayTest {
 
     @Override
     protected Array create(int dim, int length) {
-        return new ArrayMemory.UShort(SampleSystem.ofSize(dim), new 
short[length*dim]);
+        return new JavaFactory.UShort(SampleSystem.ofSize(dim), new 
short[length*dim]);
     }
 
 }

Reply via email to