public abstract class AbstractPaddingOperator extends Object implements PaddingProcessor
サロゲートペアを考慮します。
| コンストラクタと説明 |
|---|
AbstractPaddingOperator() |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
protected abstract int |
count(int codePoint)
文字数をカウントする
|
protected abstract int |
count(String text)
文字数をカウントする。
|
String |
pad(String text,
int size,
char padChar,
boolean rightAlign,
boolean chopped)
テキストをパディングする
|
public String pad(String text, int size, char padChar, boolean rightAlign, boolean chopped)
PaddingProcessorpad インタフェース内 PaddingProcessortext - パディング対象の文字size - サイズpadChar - パディングする文字。rightAlign - 右詰めするかどうか。chopped - 処理対象の文字が固定長を超えている場合に、切り出すかどうか。protected abstract int count(int codePoint)
codePoint - カウント対象のコードポイントprotected abstract int count(String text)
text - カウント対象の文字列NullPointerException - text is null.Copyright © 2018 mygreen. All rights reserved.