com.sun.xml.bind

Class WhiteSpaceProcessor

public abstract class WhiteSpaceProcessor extends Object

Processes white space normalization.

Since: 1.0

Method Summary
static Stringcollapse(String text)
static CharSequencecollapse(CharSequence text)
This is usually the biggest processing bottleneck.
static booleanisWhiteSpace(CharSequence s)
Returns true if the specified string is all whitespace.
static booleanisWhiteSpace(char ch)
returns true if the specified char is a white space character.
protected static booleanisWhiteSpaceExceptSpace(char ch)
Returns true if the specified char is a white space character but not 0x20.
static Stringreplace(String text)
static CharSequencereplace(CharSequence text)
static CharSequencetrim(CharSequence text)
Equivalent of String#trim().

Method Detail

collapse

public static String collapse(String text)

collapse

public static CharSequence collapse(CharSequence text)
This is usually the biggest processing bottleneck.

Since: 2.0

isWhiteSpace

public static final boolean isWhiteSpace(CharSequence s)
Returns true if the specified string is all whitespace.

isWhiteSpace

public static final boolean isWhiteSpace(char ch)
returns true if the specified char is a white space character.

isWhiteSpaceExceptSpace

protected static final boolean isWhiteSpaceExceptSpace(char ch)
Returns true if the specified char is a white space character but not 0x20.

replace

public static String replace(String text)

replace

public static CharSequence replace(CharSequence text)

Since: 2.0

trim

public static CharSequence trim(CharSequence text)
Equivalent of String#trim().

Since: 2.0