Class MultiArrayCopier<Source,Destination>

java.lang.Object
nom.tam.util.array.MultiArrayCopier<Source,Destination>
Type Parameters:
Source - The generic type of array from which we want to copy elements
Destination - The generic type of array to which we want to copy elements.

public final class MultiArrayCopier<Source,Destination> extends Object
Make deep copies of multi-dimensional arrays.
  • Method Details

    • copyInto

      public static <Source, Destination> void copyInto(Source fromArray, Destination toArray)
      Copies the contents of one array into another. The two arrays should match in shape and size, but may be of different types. Casting will be used to convert between types if necessary (e.g. double[][] to int[][]). .
      Type Parameters:
      Source - The generic type of array from which we want to copy elements
      Destination - The generic type of array to which we want to copy elements.
      Parameters:
      fromArray - the source array, whose data is to be copied
      toArray - the destination array, into which data is copied