Class DoubleArrayConverter

  • All Implemented Interfaces:
    TypeConverter<double[]>

    public class DoubleArrayConverter
    extends java.lang.Object
    implements TypeConverter<double[]>
    Converts given object to double[].
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double[] convert​(java.lang.Object value)
      Converts object received as parameter into object of another class.
      protected double[] convertArrayToArray​(java.lang.Object value)
      Converts array value to array.
      protected double[] convertPrimitiveArrayToArray​(java.lang.Object value, java.lang.Class primitiveComponentType)
      Converts primitive array to target array.
      protected double[] convertToSingleElementArray​(java.lang.Object value)
      Creates an array with single element.
      protected double convertType​(java.lang.Object value)
      Converts type using type converter manager.
      protected double[] convertValueToArray​(java.lang.Object value)
      Converts non-array value to array.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • convert

        public double[] convert​(java.lang.Object value)
        Description copied from interface: TypeConverter
        Converts object received as parameter into object of another class. For example, an Integer converter tries to convert given objects into target Integer object. Converters should try all reasonable ways of conversion into target object, depending on target type.
        Specified by:
        convert in interface TypeConverter<double[]>
        Parameters:
        value - object to convert from
        Returns:
        resulting object converted to target type
      • convertType

        protected double convertType​(java.lang.Object value)
        Converts type using type converter manager.
      • convertToSingleElementArray

        protected double[] convertToSingleElementArray​(java.lang.Object value)
        Creates an array with single element.
      • convertValueToArray

        protected double[] convertValueToArray​(java.lang.Object value)
        Converts non-array value to array. Detects various collection types and iterates them to make conversion and to create target array.
      • convertArrayToArray

        protected double[] convertArrayToArray​(java.lang.Object value)
        Converts array value to array.
      • convertPrimitiveArrayToArray

        protected double[] convertPrimitiveArrayToArray​(java.lang.Object value,
                                                        java.lang.Class primitiveComponentType)
        Converts primitive array to target array.