Class ParserHelper


  • @ConsumerType
    public final class ParserHelper
    extends java.lang.Object
    • Method Detail

      • parseDate

        public static java.util.Calendar parseDate​(java.lang.String string)
        Attempts to parse a string using first the ISO_8601_MILLISECONDS_DATE_FORMAT format and then the ECMA_DATE_FORMAT.
        Parameters:
        string - the string to parse
        Returns:
        a Calendar containing the parsed date or null, if the parsing failed
      • convertSingleTypeArray

        public static java.lang.Object convertSingleTypeArray​(java.lang.Object[] values)
        Converts a multi-value property to a single object.
        Parameters:
        values - the multi-value property's values
        Returns:
        an object representation of the multi-value property
        Throws:
        java.lang.IllegalArgumentException - when the provided values array contains null values, Map values, or the values are not of the same type