Package adams.data

Class ArrayUtils


  • public class ArrayUtils
    extends Object
    Helper class for arrays.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Constructor Detail

      • ArrayUtils

        public ArrayUtils()
    • Method Detail

      • primitiveToObject

        public static Object primitiveToObject​(Object arrayIn)
        Converts the primitive array into its equivalent object version. Supports: boolean, char, byte, short, int, long, float, double
        Parameters:
        arrayIn - the primitive array to convert
        Returns:
        the object version
      • objectToPrimitive

        public static Object objectToPrimitive​(Object arrayIn)
        Converts the object array into its primitive equivalent. Supports: Boolean, Character, Byte, Short, Integer, Long, Float, Double
        Parameters:
        arrayIn - the object array to convert
        Returns:
        the primitive array