Enum Utils

    • Enum Constant Detail

      • INSTANCE

        public static final Utils INSTANCE
    • Method Detail

      • values

        public static Utils[] 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 (Utils c : Utils.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Utils 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
      • encodeContent

        public static String encodeContent​(String content)
        Encodes a content String in XML-clean form, converting characters to entities as necessary and removing control characters disallowed by XML. The null string will be converted to an empty string.
      • encodeValue

        public static String encodeValue​(String value)
        Encodes an attribute value String in XML-clean form, converting quote characters to entities and removing control characters disallowed by XML.
      • isPropertyEmpty

        public static boolean isPropertyEmpty​(Property property,
                                              PropertyArity arity)
        Checks if a property would produce an empty XML element, and returns true if it would.