public final class ICalendarUtility extends Object
修飾子とタイプ | メソッドと説明 |
---|---|
static String |
escape(String data)
テキストデータ文字列のエスケープ処理を行います。
|
static ContentLineInfo |
getContentLineInfo(Class<?> clazz)
コンテンツライン情報を取得します。
|
static ContentLineInfo |
getContentLineInfo(IContentLine contentLine)
コンテンツライン情報を取得します。
|
static String |
getContentName(Class<?> clazz)
コンテンツ名を取得します。
|
static VCalendar |
getDefaultCalendar()
既定のカレンダーコンポーネントを取得します。
|
static TimeZone |
getDefaultTimeZone()
システムデフォルトタイムゾーンを取得します。
|
static ValueDataTypeInfo |
getValueDataTypeInfo(IType type)
データタイプ情報を取得します。
|
static boolean |
hasValue(IContentLine contentLine)
有効な値を保持しているかどうかを判定します。
|
static boolean |
hasValues(IContentLine... contentLines)
有効な値を保持しているかどうかを判定します。
|
static boolean |
hasValues(List<? extends IContentLine> contentLines)
有効な値を保持しているかどうかを判定します。
|
static boolean |
isMatch(String name,
Class<? extends IContentLine> clazz)
コンテンツ名が一致するかどうかを判定します。
|
static boolean |
isMatch(String name,
IContentLine contentLine)
コンテンツ名が一致するかどうかを判定します。
|
static <V> V |
match(String target,
V[] values)
文字列値に一致する値を取得します。
|
static String |
quoted(String paramValue)
ダブルクウォート処理を行います。
|
static String |
quotedRestricted(String paramValue)
制限文字があればダブルクウォート処理を行います。
|
static String |
unescape(String data)
テキストデータ文字列のエスケープ解除処理を行います。
|
static String |
unquoted(String paramValue)
ダブルクウォート解除処理を行います。
|
public static String escape(String data)
文字列が null
もしくは空・空白の場合はそのまま返却します。
以下のエスケープ処理を行います。
target | escaped |
---|---|
改行コード | "\n" (文字列) |
バックスラッシュ(\) | \\ |
カンマ(,) | \, |
セミコロン(;) | \; |
data
- テキストデータ文字列public static ContentLineInfo getContentLineInfo(Class<?> clazz)
取得できなかった場合は null
を返却します。
clazz
- クラスpublic static ContentLineInfo getContentLineInfo(IContentLine contentLine)
取得できなかった場合は null
を返却します。
contentLine
- コンテンツラインモデルpublic static String getContentName(Class<?> clazz)
取得できなかった場合は null
を返却します。
clazz
- クラスpublic static VCalendar getDefaultCalendar()
以下の既定値を格納します。
ProdId.getDefault()
Version.getDefault()
CalScale.getDefault()
public static TimeZone getDefaultTimeZone()
public static ValueDataTypeInfo getValueDataTypeInfo(IType type)
以下の場合は null
を返却します。
null
の場合type
- データタイプモデルpublic static boolean hasValue(IContentLine contentLine)
以下のすべての条件を満たす場合に true
を返却します。
null
でない場合IContentLine.hasValue()
)contentLine
- コンテンツラインモデルtrue
:有効/false
:無効)public static boolean hasValues(IContentLine... contentLines)
すべてのコンテンツラインモデルについて有効な値を保持している場合に true
を返却します。
contentLines
- コンテンツラインモデルtrue
:有効/false
:無効)hasValue(IContentLine)
public static boolean hasValues(List<? extends IContentLine> contentLines)
すべてのコンテンツラインモデルについて有効な値を保持している場合に true
を返却します。
contentLines
- コンテンツラインモデルtrue
:有効/false
:無効)hasValue(IContentLine)
public static boolean isMatch(String name, Class<? extends IContentLine> clazz)
コンテンツ名を指定されたコンテンツラインモデルクラスの定義と比較します。
name
- コンテンツ名clazz
- コンテンツラインモデルクラスtrue
:一致する/false
:一致しない)public static boolean isMatch(String name, IContentLine contentLine)
コンテンツ名を指定されたコンテンツラインモデルの定義と比較します。
name
- コンテンツ名contentLine
- コンテンツラインモデルtrue
:一致する/false
:一致しない)public static <V> V match(String target, V[] values)
指定された文字列値について、値一覧のうち文字列表現(V#toString()
)と一致する値を返却します。
以下の場合は null
を返却します。
null
もしくは空・空白の場合V
- 値の型target
- 探索する文字列値values
- 値一覧public static String quoted(String paramValue)
指定されたプロパティパラメータ値文字列全体をダブルクウォートで挟んで返却します。
文字列が null
もしくは空・空白の場合はそのまま返却します。
paramValue
- プロパティパラメータ値文字列Constants.DQUOTE_CHARACTER
public static String quotedRestricted(String paramValue)
指定されたプロパティパラメータ値文字列が以下の文字を含む場合、文字列全体をダブルクウォートで挟んで返却します。
文字列が null
もしくは空・空白の場合、および下記文字を含まない場合はそのまま返却します。
paramValue
- プロパティパラメータ値文字列Constants.DQUOTE_CHARACTER
public static String unescape(String data)
escape(String)
処理の逆変換を行います。
変換後の改行文字は iCalendar 設定情報に定義されたテキストデータ改行文字を使用します。
以下の場合は変換処理を行わずにそのまま返却します。
null
もしくは空・空白の場合テキストデータ改行文字
が null
の場合data
- テキストデータ文字列SettingUtility.getTextLineSeparator()
Copyright © 2012-2015 NTT DATA INTRAMART CORPORATION