## Class RJavaArrayTools

- java.lang.Object
- - RJavaArrayTools

    public class RJavaArrayTools
    extends java.lang.Object

### Nested Class Summary

Nested Classes
`static class` `RJavaArrayTools.ArrayDimensionMismatchException`

### Field Summary

Fields
`static int` `NA_INTEGER`
`static double` `NA_REAL`

### Constructor Summary

Constructors
`RJavaArrayTools()`

### Method Summary

All Methods Static Methods Concrete Methods Deprecated Methods
`static int` `anyDuplicated​(java.lang.Object[] array)`
`static java.lang.Boolean[]` `boxBooleans​(int[] d)`
`static java.lang.Double[]` `boxDoubles​(double[] d)`
`static java.lang.Integer[]` `boxIntegers​(int[] d)`
`static java.lang.Object` `cloneObject​(java.lang.Object o)`
`static java.lang.Object[]` `copy​(java.lang.Object[] original)`
`static boolean[]` `duplicated​(java.lang.Object[] array)`
`static java.lang.Object` `get​(java.lang.Object array, int position)`
`static java.lang.Object` `get​(java.lang.Object array, int[] position)` Gets a single object from a multi dimensional array
`static boolean` `getBoolean​(java.lang.Object array, int position)`
`static boolean` `getBoolean​(java.lang.Object array, int[] position)`
`static byte` `getByte​(java.lang.Object array, int position)`
`static byte` `getByte​(java.lang.Object array, int[] position)`
`static char` `getChar​(java.lang.Object array, int position)`
`static char` `getChar​(java.lang.Object array, int[] position)`
`static java.lang.Class` `getClassForSignature​(java.lang.String signature, java.lang.ClassLoader loader)`
`static int` `getDimensionLength​(boolean x)`
`static int` `getDimensionLength​(byte x)`
`static int` `getDimensionLength​(char x)`
`static int` `getDimensionLength​(double x)`
`static int` `getDimensionLength​(float x)`
`static int` `getDimensionLength​(int x)`
`static int` `getDimensionLength​(long x)`
`static int` `getDimensionLength​(short x)`
`static int` `getDimensionLength​(java.lang.Object o)` Returns the number of dimensions of an array
`static int[]` `getDimensions​(boolean x)`
`static int[]` `getDimensions​(byte x)`
`static int[]` `getDimensions​(char x)`
`static int[]` `getDimensions​(double x)`
`static int[]` `getDimensions​(float x)`
`static int[]` `getDimensions​(int x)`
`static int[]` `getDimensions​(long x)`
`static int[]` `getDimensions​(short x)`
`static int[]` `getDimensions​(java.lang.Object o)` Returns the dimensions of an array
`static double` `getDouble​(java.lang.Object array, int position)`
`static double` `getDouble​(java.lang.Object array, int[] position)`
`static float` `getFloat​(java.lang.Object array, int position)`
`static float` `getFloat​(java.lang.Object array, int[] position)`
`static int` `getInt​(java.lang.Object array, int position)`
`static int` `getInt​(java.lang.Object array, int[] position)`
`static java.lang.Object[]` `getIterableContent​(java.lang.Iterable o)`
`static long` `getLong​(java.lang.Object array, int position)`
`static long` `getLong​(java.lang.Object array, int[] position)`
`static int` `getObjectTypeName​(boolean x)`
`static int` `getObjectTypeName​(byte x)`
`static int` `getObjectTypeName​(char x)`
`static int` `getObjectTypeName​(double x)`
`static int` `getObjectTypeName​(float x)`
`static int` `getObjectTypeName​(int x)`
`static int` `getObjectTypeName​(long x)`
`static int` `getObjectTypeName​(short x)`
`static java.lang.String` `getObjectTypeName​(java.lang.Object o)` Get the object type name of an multi dimensional array.
`static short` `getShort​(java.lang.Object array, int position)`
`static short` `getShort​(java.lang.Object array, int[] position)`
`static int` `getTrueLength​(boolean x)`
`static int` `getTrueLength​(byte x)`
`static int` `getTrueLength​(char x)`
`static int` `getTrueLength​(double x)`
`static int` `getTrueLength​(float x)`
`static int` `getTrueLength​(int x)`
`static int` `getTrueLength​(long x)`
`static int` `getTrueLength​(short x)`
`static int` `getTrueLength​(java.lang.Object o)` Returns the true length of an array (the product of its dimensions)
`static boolean` `isArray​(boolean x)`
`static boolean` `isArray​(byte x)`
`static boolean` `isArray​(char x)`
`static boolean` `isArray​(double x)`
`static boolean` `isArray​(float x)`
`static boolean` `isArray​(int x)`
`static boolean` `isArray​(long x)`
`static boolean` `isArray​(short x)`
`static boolean` `isArray​(java.lang.Object o)` Deprecated. use RJavaArrayTools#isArray
`static boolean` `isNA​(double value)`
`static boolean` `isPrimitiveTypeName​(java.lang.String name)`
`static boolean` `isRectangularArray​(boolean x)`
`static boolean` `isRectangularArray​(byte x)`
`static boolean` `isRectangularArray​(char x)`
`static boolean` `isRectangularArray​(double x)`
`static boolean` `isRectangularArray​(float x)`
`static boolean` `isRectangularArray​(int x)`
`static boolean` `isRectangularArray​(long x)`
`static boolean` `isRectangularArray​(short x)`
`static boolean` `isRectangularArray​(java.lang.Object o)` Deprecated. use new ArrayWrapper(o).isRectangular() instead
`static boolean` `isSingleDimensionArray​(java.lang.Object o)`
`static java.lang.String` `makeArraySignature​(java.lang.String typeName, int depth)`
`static java.lang.Object[]` `rep​(java.lang.Object o, int size)` Creates a java array by cloning o several times
`static java.lang.Object[]` `rev​(java.lang.Object[] original)` Returns a copy of the input array with elements in reverse order
`static void` `set​(java.lang.Object array, int[] position, boolean value)`
`static void` `set​(java.lang.Object array, int[] position, byte value)`
`static void` `set​(java.lang.Object array, int[] position, char value)`
`static void` `set​(java.lang.Object array, int[] position, double value)`
`static void` `set​(java.lang.Object array, int[] position, float value)`
`static void` `set​(java.lang.Object array, int[] position, int value)`
`static void` `set​(java.lang.Object array, int[] position, long value)`
`static void` `set​(java.lang.Object array, int[] position, short value)`
`static void` `set​(java.lang.Object array, int[] position, java.lang.Object value)` Replaces a single value of the array
`static void` `set​(java.lang.Object array, int position, boolean value)`
`static void` `set​(java.lang.Object array, int position, byte value)`
`static void` `set​(java.lang.Object array, int position, char value)`
`static void` `set​(java.lang.Object array, int position, double value)`
`static void` `set​(java.lang.Object array, int position, float value)`
`static void` `set​(java.lang.Object array, int position, int value)`
`static void` `set​(java.lang.Object array, int position, long value)`
`static void` `set​(java.lang.Object array, int position, short value)`
`static void` `set​(java.lang.Object array, int position, java.lang.Object value)`
`static java.lang.Object[]` `sort​(java.lang.Object[] array, boolean decreasing)` Returns a copy of the array where elements are sorted
`static int[]` `unboxBooleans​(java.lang.Boolean[] o)`
`static double[]` `unboxDoubles​(java.lang.Double[] o)`
`static int[]` `unboxIntegers​(java.lang.Integer[] o)`
`static java.lang.Object[]` `unique​(java.lang.Object[] array)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### NA_INTEGER

    public static final int NA_INTEGER

See Also:
  Constant Field Values

#### NA_REAL

    public static final double NA_REAL

### Constructor Detail

#### RJavaArrayTools

    public RJavaArrayTools()

### Method Detail

#### getObjectTypeName

    public static java.lang.String getObjectTypeName​(java.lang.Object o)
                                              throws NotAnArrayException

Get the object type name of an multi dimensional array.

Parameters:
  `o` - object
Throws:
  `NotAnArrayException` - if the object is not an array

#### getObjectTypeName

    public static int getObjectTypeName​(int x)
                                 throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getObjectTypeName

    public static int getObjectTypeName​(boolean x)
                                 throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getObjectTypeName

    public static int getObjectTypeName​(byte x)
                                 throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getObjectTypeName

    public static int getObjectTypeName​(long x)
                                 throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getObjectTypeName

    public static int getObjectTypeName​(short x)
                                 throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getObjectTypeName

    public static int getObjectTypeName​(double x)
                                 throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getObjectTypeName

    public static int getObjectTypeName​(char x)
                                 throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getObjectTypeName

    public static int getObjectTypeName​(float x)
                                 throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### makeArraySignature

    public static java.lang.String makeArraySignature​(java.lang.String typeName,
                                                      int depth)

#### getClassForSignature

    public static java.lang.Class getClassForSignature​(java.lang.String signature,
                                                       java.lang.ClassLoader loader)
                                                throws java.lang.ClassNotFoundException

Throws:
  `java.lang.ClassNotFoundException`

#### isSingleDimensionArray

    public static boolean isSingleDimensionArray​(java.lang.Object o)
                                          throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### isPrimitiveTypeName

    public static boolean isPrimitiveTypeName​(java.lang.String name)

#### isRectangularArray

    public static boolean isRectangularArray​(java.lang.Object o)

Deprecated.
use new ArrayWrapper(o).isRectangular() instead
Indicates if o is a rectangular array

Parameters:
  `o` - an array

#### isRectangularArray

    public static boolean isRectangularArray​(int x)

#### isRectangularArray

    public static boolean isRectangularArray​(boolean x)

#### isRectangularArray

    public static boolean isRectangularArray​(byte x)

#### isRectangularArray

    public static boolean isRectangularArray​(long x)

#### isRectangularArray

    public static boolean isRectangularArray​(short x)

#### isRectangularArray

    public static boolean isRectangularArray​(double x)

#### isRectangularArray

    public static boolean isRectangularArray​(char x)

#### isRectangularArray

    public static boolean isRectangularArray​(float x)

#### getDimensionLength

    public static int getDimensionLength​(java.lang.Object o)
                                  throws NotAnArrayException,
                                         java.lang.NullPointerException

Returns the number of dimensions of an array

Parameters:
  `o` - an array
Throws:
  `NotAnArrayException` - if this is not an array
  `java.lang.NullPointerException`

#### getDimensionLength

    public static int getDimensionLength​(int x)
                                  throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getDimensionLength

    public static int getDimensionLength​(boolean x)
                                  throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getDimensionLength

    public static int getDimensionLength​(byte x)
                                  throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getDimensionLength

    public static int getDimensionLength​(long x)
                                  throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getDimensionLength

    public static int getDimensionLength​(short x)
                                  throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getDimensionLength

    public static int getDimensionLength​(double x)
                                  throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getDimensionLength

    public static int getDimensionLength​(char x)
                                  throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getDimensionLength

    public static int getDimensionLength​(float x)
                                  throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getDimensions

    public static int[] getDimensions​(java.lang.Object o)
                               throws NotAnArrayException,
                                      java.lang.NullPointerException

Returns the dimensions of an array

Parameters:
  `o` - an array
Returns:
  the dimensions of the array or null if the object is null
Throws:
  `NotAnArrayException` - if this is not an array
  `java.lang.NullPointerException`

#### getDimensions

    public static int[] getDimensions​(int x)
                               throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getDimensions

    public static int[] getDimensions​(boolean x)
                               throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getDimensions

    public static int[] getDimensions​(byte x)
                               throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getDimensions

    public static int[] getDimensions​(long x)
                               throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getDimensions

    public static int[] getDimensions​(short x)
                               throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getDimensions

    public static int[] getDimensions​(double x)
                               throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getDimensions

    public static int[] getDimensions​(char x)
                               throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getDimensions

    public static int[] getDimensions​(float x)
                               throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getTrueLength

    public static int getTrueLength​(java.lang.Object o)
                             throws NotAnArrayException,
                                    java.lang.NullPointerException

Returns the true length of an array (the product of its dimensions)

Parameters:
  `o` - an array
Returns:
  the number of objects in the array (the product of its dimensions).
Throws:
  `NotAnArrayException` - if this is not an array
  `java.lang.NullPointerException`

#### getTrueLength

    public static int getTrueLength​(int x)
                             throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getTrueLength

    public static int getTrueLength​(boolean x)
                             throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getTrueLength

    public static int getTrueLength​(byte x)
                             throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getTrueLength

    public static int getTrueLength​(long x)
                             throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getTrueLength

    public static int getTrueLength​(short x)
                             throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getTrueLength

    public static int getTrueLength​(double x)
                             throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getTrueLength

    public static int getTrueLength​(char x)
                             throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### getTrueLength

    public static int getTrueLength​(float x)
                             throws NotAnArrayException

Throws:
  `NotAnArrayException`

#### isArray

    public static boolean isArray​(java.lang.Object o)

Deprecated.
use RJavaArrayTools#isArray
Indicates if a java object is an array

Parameters:
  `o` - object
Returns:
  true if the object is an array

#### isArray

    public static boolean isArray​(int x)

#### isArray

    public static boolean isArray​(boolean x)

#### isArray

    public static boolean isArray​(byte x)

#### isArray

    public static boolean isArray​(long x)

#### isArray

    public static boolean isArray​(short x)

#### isArray

    public static boolean isArray​(double x)

#### isArray

    public static boolean isArray​(char x)

#### isArray

    public static boolean isArray​(float x)

#### get

    public static java.lang.Object get​(java.lang.Object array,
                                       int[] position)
                                throws NotAnArrayException,
                                       RJavaArrayTools.ArrayDimensionMismatchException

Gets a single object from a multi dimensional array

Parameters:
  `array` - java array
  `position` -
Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### getInt

    public static int getInt​(java.lang.Object array,
                             int[] position)
                      throws NotAnArrayException,
                             RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### getBoolean

    public static boolean getBoolean​(java.lang.Object array,
                                     int[] position)
                              throws NotAnArrayException,
                                     RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### getByte

    public static byte getByte​(java.lang.Object array,
                               int[] position)
                        throws NotAnArrayException,
                               RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### getLong

    public static long getLong​(java.lang.Object array,
                               int[] position)
                        throws NotAnArrayException,
                               RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### getShort

    public static short getShort​(java.lang.Object array,
                                 int[] position)
                          throws NotAnArrayException,
                                 RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### getDouble

    public static double getDouble​(java.lang.Object array,
                                   int[] position)
                            throws NotAnArrayException,
                                   RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### getChar

    public static char getChar​(java.lang.Object array,
                               int[] position)
                        throws NotAnArrayException,
                               RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### getFloat

    public static float getFloat​(java.lang.Object array,
                                 int[] position)
                          throws NotAnArrayException,
                                 RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### get

    public static java.lang.Object get​(java.lang.Object array,
                                       int position)
                                throws NotAnArrayException,
                                       RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### getInt

    public static int getInt​(java.lang.Object array,
                             int position)
                      throws NotAnArrayException,
                             RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### getBoolean

    public static boolean getBoolean​(java.lang.Object array,
                                     int position)
                              throws NotAnArrayException,
                                     RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### getByte

    public static byte getByte​(java.lang.Object array,
                               int position)
                        throws NotAnArrayException,
                               RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### getLong

    public static long getLong​(java.lang.Object array,
                               int position)
                        throws NotAnArrayException,
                               RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### getShort

    public static short getShort​(java.lang.Object array,
                                 int position)
                          throws NotAnArrayException,
                                 RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### getDouble

    public static double getDouble​(java.lang.Object array,
                                   int position)
                            throws NotAnArrayException,
                                   RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### getChar

    public static char getChar​(java.lang.Object array,
                               int position)
                        throws NotAnArrayException,
                               RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### getFloat

    public static float getFloat​(java.lang.Object array,
                                 int position)
                          throws NotAnArrayException,
                                 RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### set

    public static void set​(java.lang.Object array,
                           int[] position,
                           java.lang.Object value)
                    throws NotAnArrayException,
                           RJavaArrayTools.ArrayDimensionMismatchException

Replaces a single value of the array

Parameters:
  `array` - array
  `position` - index
  `value` - the new value
Throws:
  `NotAnArrayException` - if array is not an array
  `RJavaArrayTools.ArrayDimensionMismatchException` - if the length of position is too big

#### set

    public static void set​(java.lang.Object array,
                           int[] position,
                           int value)
                    throws NotAnArrayException,
                           RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### set

    public static void set​(java.lang.Object array,
                           int[] position,
                           boolean value)
                    throws NotAnArrayException,
                           RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### set

    public static void set​(java.lang.Object array,
                           int[] position,
                           byte value)
                    throws NotAnArrayException,
                           RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### set

    public static void set​(java.lang.Object array,
                           int[] position,
                           long value)
                    throws NotAnArrayException,
                           RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### set

    public static void set​(java.lang.Object array,
                           int[] position,
                           short value)
                    throws NotAnArrayException,
                           RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### set

    public static void set​(java.lang.Object array,
                           int[] position,
                           double value)
                    throws NotAnArrayException,
                           RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### set

    public static void set​(java.lang.Object array,
                           int[] position,
                           char value)
                    throws NotAnArrayException,
                           RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### set

    public static void set​(java.lang.Object array,
                           int[] position,
                           float value)
                    throws NotAnArrayException,
                           RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### set

    public static void set​(java.lang.Object array,
                           int position,
                           java.lang.Object value)
                    throws NotAnArrayException,
                           RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### set

    public static void set​(java.lang.Object array,
                           int position,
                           int value)
                    throws NotAnArrayException,
                           RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### set

    public static void set​(java.lang.Object array,
                           int position,
                           boolean value)
                    throws NotAnArrayException,
                           RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### set

    public static void set​(java.lang.Object array,
                           int position,
                           byte value)
                    throws NotAnArrayException,
                           RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### set

    public static void set​(java.lang.Object array,
                           int position,
                           long value)
                    throws NotAnArrayException,
                           RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### set

    public static void set​(java.lang.Object array,
                           int position,
                           short value)
                    throws NotAnArrayException,
                           RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### set

    public static void set​(java.lang.Object array,
                           int position,
                           double value)
                    throws NotAnArrayException,
                           RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### set

    public static void set​(java.lang.Object array,
                           int position,
                           char value)
                    throws NotAnArrayException,
                           RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### set

    public static void set​(java.lang.Object array,
                           int position,
                           float value)
                    throws NotAnArrayException,
                           RJavaArrayTools.ArrayDimensionMismatchException

Throws:
  `NotAnArrayException`
  `RJavaArrayTools.ArrayDimensionMismatchException`

#### unique

    public static java.lang.Object[] unique​(java.lang.Object[] array)

#### duplicated

    public static boolean[] duplicated​(java.lang.Object[] array)

#### anyDuplicated

    public static int anyDuplicated​(java.lang.Object[] array)

#### sort

    public static java.lang.Object[] sort​(java.lang.Object[] array,
                                          boolean decreasing)
                                   throws NotComparableException

Returns a copy of the array where elements are sorted

Parameters:
  `array` - array of Objects.
  `decreasing` - if true the sort is in decreasing order
Throws:
  `NotComparableException` - if the component type of the array does not implement the Comparable interface

#### rev

    public static java.lang.Object[] rev​(java.lang.Object[] original)

Returns a copy of the input array with elements in reverse order

Parameters:
  `original` - input array

#### copy

    public static java.lang.Object[] copy​(java.lang.Object[] original)

#### getIterableContent

    public static java.lang.Object[] getIterableContent​(java.lang.Iterable o)

#### rep

    public static java.lang.Object[] rep​(java.lang.Object o,
                                         int size)
                                  throws java.lang.Throwable

Creates a java array by cloning o several times

Parameters:
  `o` - object to clone
  `size` - number of times to replicate the object
Throws:
  `java.lang.Throwable`

#### cloneObject

    public static java.lang.Object cloneObject​(java.lang.Object o)
                                        throws java.lang.Throwable

Throws:
  `java.lang.Throwable`

#### unboxDoubles

    public static double[] unboxDoubles​(java.lang.Double[] o)

#### unboxIntegers

    public static int[] unboxIntegers​(java.lang.Integer[] o)

#### unboxBooleans

    public static int[] unboxBooleans​(java.lang.Boolean[] o)

#### isNA

    public static boolean isNA​(double value)

#### boxDoubles

    public static java.lang.Double[] boxDoubles​(double[] d)

#### boxIntegers

    public static java.lang.Integer[] boxIntegers​(int[] d)

#### boxBooleans

    public static java.lang.Boolean[] boxBooleans​(int[] d)