Enum TextTypes.StringConversion

    • Enum Constant Detail

      • NULLABLE_RAW

        public static final TextTypes.StringConversion NULLABLE_RAW
        Leading and trailing whitespace is preserved and the empty string is parsed as a null value.
      • NULLABLE_TRIMMED

        public static final TextTypes.StringConversion NULLABLE_TRIMMED
        Leading and trailing whitespace is removed and the empty string is parsed as a null value.
    • Method Detail

      • values

        public static TextTypes.StringConversion[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TextTypes.StringConversion c : TextTypes.StringConversion.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TextTypes.StringConversion valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • isTrimmed

        public boolean isTrimmed()
        Indicates whether the conversion trims leading and trailing whitespace.
        Returns:
        true if the conversion will trim whitespace, otherwise false.
      • isNullable

        public boolean isNullable()
        Indicates whether the empty string is converted to a null value or preserved as the empty string.
        Returns:
        true if the conversion translates the empty string, otherwise false.
      • getConversion

        public static TextTypes.StringConversion getConversion​(boolean trimWhitespace,
                                                               boolean nullable)
        Gets the conversion with the specified properties.
        Parameters:
        trimWhitespace - whether the conversion should trim whitespace
        nullable - whether the conversion translates the empty string to null
        Returns:
        the appropriate conversion