public abstract class ObjectCell<T> extends Object implements CommonCell
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected String |
formatPattern
フォーマットの書式
|
protected T |
value
値
|
| コンストラクタと説明 |
|---|
ObjectCell(T value,
short formatIndex)
値と書式のインデックス番号を指定するコンストラクタ。
|
ObjectCell(T value,
short formatIndex,
String formatPattern)
値と、書式のインデックス番号、書式を指定するコンストラクタ。
|
ObjectCell(T value,
String formatPattern)
値とその書式を指定するコンストラクタ。
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
boolean |
getBooleanCellValue()
設定した値の型と一致しない場合、このメソッドを呼ぶと
IllegalStateExceptionをスローします。 |
String |
getCellAddress()
セルのアドレスを取得する。
|
Date |
getDateCellValue()
設定した値の型と一致しない場合、このメソッドを呼ぶと
IllegalStateExceptionをスローします。 |
short |
getFormatIndex()
書式のインデックス番号を取得する。
|
String |
getFormatPattern()
書式のパターンを取得する。
|
double |
getNumberCellValue()
設定した値の型と一致しない場合、このメソッドを呼ぶと
IllegalStateExceptionをスローします。 |
String |
getTextCellValue()
設定した値の型と一致しない場合、このメソッドを呼ぶと
IllegalStateExceptionをスローします。 |
T |
getValue()
設定した値を取得します。
|
boolean |
isBoolean()
ブール型のセルかどうか。
|
boolean |
isDateStart1904()
日時の開始日が1904年かどうか。
|
boolean |
isNumber()
数値型のセルかどうか。
|
boolean |
isText()
文字列型のセルかどうか。
|
protected final T value
protected final String formatPattern
public ObjectCell(T value, short formatIndex)
フォーマットの書式は、nullになります。
value - フォーマット対象の値。formatIndex - 書式のインデックス番号。IllegalArgumentException - value == nullIllegalArgumentException - formatIndex < 0public ObjectCell(T value, String formatPattern)
フォーマットのインデックス番号は、存在しないことを示す-1となります。
value - フォーマット対象の値。formatPattern - Excelの書式。IllegalArgumentException - value == nullIllegalArgumentException - formatPattern == null || formatPatter.length() == 0.public ObjectCell(T value, short formatIndex, String formatPattern)
value - フォーマット対象の値。formatIndex - フォーマットのインデックス番号。formatPattern - Excelの書式。IllegalArgumentException - value == nullIllegalArgumentException - formatIndex < 0IllegalArgumentException - formatPattern == null || formatPatter.length() == 0.public T getValue()
public short getFormatIndex()
CommonCellインデックス番号がない場合は0を返す。
getFormatIndex インタフェース内 CommonCellpublic String getFormatPattern()
パターンがない場合は、空文字を返す。
コンストラクタで指定したフォーマットを返します。
getFormatPattern インタフェース内 CommonCellpublic boolean isText()
isText インタフェース内 CommonCellpublic boolean isBoolean()
isBoolean インタフェース内 CommonCellpublic boolean isNumber()
isNumber インタフェース内 CommonCellpublic String getTextCellValue()
IllegalStateExceptionをスローします。getTextCellValue インタフェース内 CommonCellpublic boolean getBooleanCellValue()
IllegalStateExceptionをスローします。getBooleanCellValue インタフェース内 CommonCellpublic double getNumberCellValue()
IllegalStateExceptionをスローします。getNumberCellValue インタフェース内 CommonCellpublic Date getDateCellValue()
IllegalStateExceptionをスローします。getDateCellValue インタフェース内 CommonCellpublic boolean isDateStart1904()
isDateStart1904 インタフェース内 CommonCellpublic String getCellAddress()
常に、'A1'を返します。
getCellAddress インタフェース内 CommonCellCopyright © 2021 mygreen. All rights reserved.