Class RJavaArrayTools


  • public class RJavaArrayTools
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int NA_INTEGER  
      static double NA_REAL  
    • Constructor Summary

      Constructors 
      Constructor Description
      RJavaArrayTools()  
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      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