|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.mklab.nfc.matx.MatxAbstractObject
org.mklab.nfc.matx.MatxString
public class MatxString
可変文字列に対して文字列の操作や書式付きの出力を行うためのクラスです。
| コンストラクタの概要 | |
|---|---|
MatxString()
文字をもたず、初期容量が 16 文字であるMxStringを生成します。 |
|
MatxString(int length)
文字をもたず、引数 length によって指定された初期容量である MxStringを生成します。 |
|
MatxString(String string)
stringで指定した文字列バッファをもつMxStringを生成します。 |
|
| メソッドの概要 | |
|---|---|
MatxString |
add(String string)
文字列stringを追加たMxSringを返します。 |
char |
charAt(int index)
indexで指定した位置の文字を返します。 |
Object |
clone()
Object#clone() |
BooleanMatrix |
compareElementWise(MatxString opponent,
String operator)
各文字とopponentの各文字をoperatorで指定した演算子で比較し, 結果を BooleanMatrix で返します。 |
BooleanMatrix |
compareElementWise(String operator,
char ch)
各文字列とchをoperatorで指定した演算子で比較し、 結果を BooleanMatrix
で返します。 |
String |
getSubString(BooleanMatrix indexMatrix)
boolean行列のtrueのがある位置の文字列を返します。 |
String |
getSubString(int[] index)
indexで指定した位置の文字列を返します。 |
String |
getSubString(int from,
int to)
fromからtoまでの部分文字列を返します。 |
String |
getSubString(int from,
int step,
int to)
fromからtoまでstep飛びの位置にある部分文字列を返します。 |
int |
length()
この文字列バッファの長さ (文字数) を返します。 |
MatxString |
multiply(int count)
count回繰り返した文字列バッファをもつMxStringを返します。 |
static int |
mxEquals(String string1,
String string2)
s1とs2が等しいか判定します。 |
static int |
mxNotEquals(String string1,
String string2)
s1とs2が等しくないか判定します。 |
static MatxString |
readMxFormat(InputStream input)
MX形式の文字列を入力ストリームから読み込みます。 |
static MatxString |
readMxFormat(MxDataHead head,
InputStream input)
MX形式の文字列を入力ストリームから読み込みます。 |
void |
setCharAt(int index,
char ch)
indexで指定した位置の文字をchを代入します。 |
void |
setSubString(int from,
int step,
int to,
String string)
fromからtoまでstep飛びの位置にある文字をstrで置き換える。 |
void |
setSubString(int from,
int to,
String string)
fromからtoまでをstringで置き換える。 |
String |
toMmString()
MM形式の文字列を生成します。 |
String |
toMmString(String format)
MM形式の文字列を生成します。 |
String |
toString()
保持するStringを返します。 |
static void |
writeMmFormat(String str,
Writer output,
String name)
MM形式で文字列をライターへ出力します。 |
static void |
writeMmFormat(String str,
Writer output,
String name,
boolean withNewLine)
MM形式で文字列をライターへ出力します。 |
void |
writeMmFormat(Writer output,
String name,
boolean withNewLine)
MMフォーマット行列データをライターに出力します。 |
void |
writeMxFormat(OutputStream output,
String name)
データをMX形式で出力ストリームへ出力します。 |
static void |
writeMxFormat(String str,
OutputStream output,
String name)
MX形式で文字列を出力ストリームに出力します。 |
| クラス org.mklab.nfc.matx.MatxAbstractObject から継承されたメソッド |
|---|
writeMmFormat, writeMxFormat |
| クラス java.lang.Object から継承されたメソッド |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public MatxString()
public MatxString(int length)
length - 初期容量public MatxString(String string)
string - 文字列| メソッドの詳細 |
|---|
public String toString()
Object 内の toStringpublic MatxString add(String string)
string - 追加する文字列。
public int length()
public MatxString multiply(int count)
count - 繰り返し回数
public char charAt(int index)
index - 指定位置
public void setCharAt(int index,
char ch)
index - 指定位置ch - 変更文字
public String getSubString(int from,
int to)
from - 開始位置to - 終了位置
public String getSubString(int from,
int step,
int to)
from - 開始位置step - ステップ数to - 終了位置
public String getSubString(int[] index)
index - 位置指定行列
public String getSubString(BooleanMatrix indexMatrix)
indexMatrix - 文字列を取り出す位置の要素がtrueであるboolean行列
public void setSubString(int from,
int to,
String string)
from - 開始位置to - 終了位置string - 変更文字列
public void setSubString(int from,
int step,
int to,
String string)
from - 開始位置step - step数to - 終了位置string - 変更文字列
public static int mxEquals(String string1,
String string2)
string1 - 比較する文字列string2 - 比較する文字列
public static int mxNotEquals(String string1,
String string2)
string1 - 比較する文字列string2 - 比較する文字列
public BooleanMatrix compareElementWise(String operator,
char ch)
BooleanMatrix
で返します。
operator - 演算を表す文字列ch - 演算の対象となる文字
public BooleanMatrix compareElementWise(MatxString opponent,
String operator)
BooleanMatrix で返します。
opponent - 比較する対象の文字列operator - 演算子
public void writeMxFormat(OutputStream output,
String name)
throws IOException
MatxObject の記述:
MatxObject 内の writeMxFormatoutput - 出力ストリームname - データの名前
IOException - 出力ストリームに出力できない場合MatxObject.writeMxFormat(java.io.OutputStream,
java.lang.String)
public static void writeMxFormat(String str,
OutputStream output,
String name)
throws IOException
str - 出力する文字列output - 出力ストリームname - 名前
IOException - ストリームに出力できない場合
public static MatxString readMxFormat(InputStream input)
throws IOException
input - 入力ストリーム
IOException - 入力ストリームから読み込めない場合
public static MatxString readMxFormat(MxDataHead head,
InputStream input)
throws IOException
input - 入力ストリームhead - ヘッダ情報
IOException - 入力ストリームから読み込めない場合
public void writeMmFormat(Writer output,
String name,
boolean withNewLine)
throws IOException
MatxObject の記述:
MatxObject 内の writeMmFormatoutput - ライターname - 名前withNewLine - セミコロンと改行コードを出力するならばtrue、そうでなければfalse
IOException - ライターに出力できない場合MatxObject.writeMmFormat(java.io.Writer,
java.lang.String, boolean)
public static void writeMmFormat(String str,
Writer output,
String name)
throws IOException
str - 出力する文字列output - ライターname - 名前
IOException - ライターへ出力できない場合
public static void writeMmFormat(String str,
Writer output,
String name,
boolean withNewLine)
throws IOException
str - 出力する文字列output - ライターname - 名前withNewLine - 改行コードを出力するならばtrue、そうでなければfalse
IOException - ライターへ出力できない場合public Object clone()
Object 内の clonepublic String toMmString()
MatxObject の記述:
MatxObject 内の toMmStringMatxObject.toMmString()public String toMmString(String format)
MatxObject の記述:
MatxObject 内の toMmStringformat - 出力フォーマット
MatxObject.toMmString(java.lang.String)
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||