Package xmlparser.utils
Enum Trimming
java.lang.Object
java.lang.Enum<Trimming>
xmlparser.utils.Trimming
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Trimming>,java.lang.constant.Constable
public enum Trimming extends java.lang.Enum<Trimming>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTrimming.LenientTrimmerstatic classTrimming.NativeTrimmerstatic interfaceTrimming.Trimstatic classTrimming.XmlTrimmer -
Field Summary
Fields Modifier and Type Field Description static java.util.Set<java.lang.Character>ALL_WHITESPACE_CHARACTERSstatic java.util.Map<java.lang.String,java.lang.Character>WHITESPACE_CHARS -
Method Summary
Modifier and Type Method Description static booleanisLenientWhitespace(char c)static booleanisXmlWhitespace(char c)static java.lang.Stringtrim(java.lang.String value, java.util.function.Function<java.lang.Character,java.lang.Boolean> isWhitespace)static TrimmingvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Trimming[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Field Details
-
WHITESPACE_CHARS
public static java.util.Map<java.lang.String,java.lang.Character> WHITESPACE_CHARS -
ALL_WHITESPACE_CHARACTERS
public static final java.util.Set<java.lang.Character> ALL_WHITESPACE_CHARACTERS
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
isLenientWhitespace
public static boolean isLenientWhitespace(char c) -
isXmlWhitespace
public static boolean isXmlWhitespace(char c) -
trim
public static java.lang.String trim(java.lang.String value, java.util.function.Function<java.lang.Character,java.lang.Boolean> isWhitespace)
-