Interface InputParser.InputConverter<T>

    • Method Detail

      • toByte

        byte toByte​(T data)
             throws java.io.IOException
        Converts parsed data returned by InputParser.ParseResult to byte.
        Parameters:
        data - the obtained data
        Returns:
        the converted integer
        Throws:
        java.io.IOException - if conversion fails
      • toInteger

        int toInteger​(T data)
               throws java.io.IOException
        Converts parsed data returned by InputParser.ParseResult to integer.
        Parameters:
        data - the obtained data
        Returns:
        the converted integer
        Throws:
        java.io.IOException - if conversion fails
      • toLong

        long toLong​(T data)
             throws java.io.IOException
        Converts parsed data returned by InputParser.ParseResult to long.
        Parameters:
        data - the obtained data
        Returns:
        the converted long
        Throws:
        java.io.IOException - if conversion fails
      • toShort

        short toShort​(T data)
               throws java.io.IOException
        Converts parsed data returned by InputParser.ParseResult to short.
        Parameters:
        data - the obtained data
        Returns:
        the converted long
        Throws:
        java.io.IOException - if conversion fails
      • toString

        java.lang.String toString​(T data)
                           throws java.io.IOException
        Converts parsed data returned by InputParser.ParseResult to String.
        Parameters:
        data - the obtained data
        Returns:
        the converted String
        Throws:
        java.io.IOException - if conversion fails
      • toDouble

        double toDouble​(T data)
                 throws java.io.IOException
        Converts parsed data returned by InputParser.ParseResult to double.
        Parameters:
        data - the obtained data
        Returns:
        the converted double
        Throws:
        java.io.IOException - if conversion fails
      • toFloat

        float toFloat​(T data)
               throws java.io.IOException
        Converts parsed data returned by InputParser.ParseResult to float.
        Parameters:
        data - the obtained data
        Returns:
        the converted float
        Throws:
        java.io.IOException - if conversion fails
      • toBoolean

        boolean toBoolean​(T data)
                   throws java.io.IOException
        Converts parsed data returned by InputParser.ParseResult to Boolean.
        Parameters:
        data - the obtained data
        Returns:
        the converted Boolean
        Throws:
        java.io.IOException - if conversion fails
      • toIntegerArray

        int[] toIntegerArray​(T data)
                      throws java.io.IOException
        Converts parsed data returned by InputParser.ParseResult to an integer array.
        Parameters:
        data - the obtained data
        Returns:
        the converted integer array
        Throws:
        java.io.IOException - if conversion fails
      • toStringArray

        java.lang.String[] toStringArray​(T data)
                                  throws java.io.IOException
        Converts parsed data returned by InputParser.ParseResult to a String array.
        Parameters:
        data - the obtained data
        Returns:
        the converted integer array
        Throws:
        java.io.IOException - if conversion fails
      • toDoubleArray

        double[] toDoubleArray​(T data)
                        throws java.io.IOException
        Converts parsed data returned by InputParser.ParseResult to a double array.
        Parameters:
        data - the obtained data
        Returns:
        the converted double array
        Throws:
        java.io.IOException - if conversion fails
      • toByteArray

        byte[] toByteArray​(T data)
                    throws java.io.IOException
        Converts parsed data returned by InputParser.ParseResult to a byte array.
        Parameters:
        data - the obtained data
        Returns:
        the converted double array
        Throws:
        java.io.IOException - if conversion fails
      • toDate

        default java.util.Date toDate​(T data,
                                      java.lang.String format)
                               throws java.io.IOException
        Converts parsed data returned by InputParser.ParseResult to a date representation.
        Parameters:
        data - the obtained data
        format - the target date format (see FormatCache)
        Returns:
        the converted date
        Throws:
        java.io.IOException - if conversion fails
      • toLocalDateTime

        default java.time.LocalDateTime toLocalDateTime​(T data,
                                                        java.lang.String format)
                                                 throws java.io.IOException
        Converts parsed data returned by InputParser.ParseResult to a date representation.
        Parameters:
        data - the obtained data
        format - the target date format (see FormatCache)
        Returns:
        the converted date
        Throws:
        java.io.IOException - if conversion fails
      • toEnum

        default <E extends java.lang.Enum<E> & de.iip_ecosphere.platform.transport.serialization.IipEnum> E toEnum​(T data,
                                                                                                                   java.lang.Class<E> enumType)
                                                                                                            throws java.io.IOException
        Converts parsed data returned by InputParser.ParseResult to an instance of enumType. Primarily, a conversion to toInteger(Object) and IipEnum.getModelOrdinal() is performed. If this fails, a name-based enum conversion is applied.
        Type Parameters:
        E - the enum type
        Parameters:
        data - the obtained data
        enumType - enumeration target type
        Returns:
        the converted enum instance
        Throws:
        java.io.IOException - if the conversion fails
      • toObject

        java.lang.Object toObject​(T data)
                           throws java.io.IOException
        Converts parsed data returned by InputParser.ParseResult to an object. [fallback dummy]
        Parameters:
        data - the obtained data
        Returns:
        the converted double array
        Throws:
        java.io.IOException - if conversion fails