|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.marketcetera.util.misc.UCPFilter
public abstract class UCPFilter
A filter for Unicode code points. It also maintains a cache of
filters associated with Charset instances.
For charset-based filters, this class may perform slowly when the cache is built, if the JVM is running with an active debugging agent. This is because the JRE implements the acceptability test by throwing and catching an exception, which is trapped by the agent; if the charset can only encode a small subset of the Unicode code points, then a lot of exceptions are thrown and caught, resulting in a performance degradation as the agent intercepts repeatedly (even if the debugger does not indicate an interest in exceptions).
| Field Summary | |
|---|---|
static UCPFilter |
ALNUM
A filter for Unicode code points that are letters or digits. |
static UCPFilter |
CHAR
A filter for Unicode characters that can be represented by a single char. |
static UCPFilter |
DIGIT
A filter for Unicode code points that are digits. |
static UCPFilter |
LETTER
A filter for Unicode code points that are letters. |
static UCPFilter |
VALID
A filter for Unicode characters deemed valid by StringUtils.isValid(int). |
| Constructor Summary | |
|---|---|
UCPFilter()
|
|
| Method Summary | |
|---|---|
static UCPFilter |
forCharset(Charset cs)
Returns a filter for Unicode code points that can be encoded by the given charset. |
static UCPFilter |
getDefaultCharset()
Returns a filter for Unicode code points that can be encoded by the default JVM charset. |
static UCPFilter |
getFileSystemCharset()
Returns a filter for Unicode code points that can be encoded by the current system file encoding/charset (as specified in the system property file.encoding). |
abstract boolean |
isAcceptable(int ucp)
Checks whether the given Unicode code point is acceptable to the receiver. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final UCPFilter VALID
StringUtils.isValid(int).
public static final UCPFilter CHAR
public static final UCPFilter DIGIT
public static final UCPFilter LETTER
public static final UCPFilter ALNUM
| Constructor Detail |
|---|
public UCPFilter()
| Method Detail |
|---|
public static UCPFilter forCharset(Charset cs)
cs - The charset.
public static final UCPFilter getDefaultCharset()
public static final UCPFilter getFileSystemCharset()
file.encoding).
public abstract boolean isAcceptable(int ucp)
ucp - The code point.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||