Class LiteralCharsetDef
java.lang.Object
nablarch.core.validation.validator.unicode.CharsetDefSupport
nablarch.core.validation.validator.unicode.LiteralCharsetDef
- All Implemented Interfaces:
- CharsetDef
リテラル文字列による許容文字集合定義クラス。
定義したい文字集合の要素が、Unicodeコードポイント上に散在する場合、 範囲指定による集合定義は煩雑になるおそれがある。 そのような場合には、本クラスを利用することで簡便に文字集合を定義できる。
定義したい文字集合の要素が、Unicodeコードポイント上に散在する場合、 範囲指定による集合定義は煩雑になるおそれがある。 そのような場合には、本クラスを利用することで簡便に文字集合を定義できる。
 
 // 1と3を許可
 LiteralCharsetDef oneAndThree = new LiteralCharsetDef();
 oneAndThree.setAllowedCharacters("13");
 
 - 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancontains(int codePoint) コードポイントが許容文字であるか判定する。setAllowedCharacters(String allowedCharacters) 許容文字を設定する。 許容文字がBMPの範囲外にあり表示や入力に難がある場合は、U+n表記を使用するとよい。 例えば、ホッケ(U+29E3D)の場合は\uD867\uDE3Dのように入力する。Methods inherited from class nablarch.core.validation.validator.unicode.CharsetDefSupportgetMessageId, setMessageId
- 
Constructor Details- 
LiteralCharsetDefpublic LiteralCharsetDef()
 
- 
- 
Method Details- 
containspublic boolean contains(int codePoint) コードポイントが許容文字であるか判定する。- Parameters:
- codePoint- Unicodeコードポイント
- Returns:
- 許容文字である場合、真
 
- 
setAllowedCharacters許容文字を設定する。 許容文字がBMPの範囲外にあり表示や入力に難がある場合は、U+n表記を使用するとよい。 例えば、ホッケ(U+29E3D)の場合は\uD867\uDE3Dのように入力する。- Parameters:
- allowedCharacters- 許容文字
- Returns:
- 本インスタンス自身
 
 
-