パッケージ org.thinkit.zenna.util
クラス ContentNodeResolver
java.lang.Object
org.thinkit.zenna.util.ContentNodeResolver
public final class ContentNodeResolver extends Object
Provides operations on content node.
- 導入されたバージョン:
- 1.0.0
-
メソッドの概要
修飾子とタイプ メソッド 説明 static List<Map<String,Object>>getNodeList(@NonNull Map<String,Object> content, @NonNull ContentKey contentKey)Returns the list of nodes associated with the specifiedContentKeyfrom the content map.static Map<String,Object>getNodeMap(@NonNull Map<String,Object> content, @NonNull ContentKey contentKey)Returns the node map associated with the specifiedContentKeyfrom the content map.static ObjectgetObject(@NonNull Map<String,Object> nodeMap, @NonNull String contentKey)Returns a value of type Object based on the content key specified as an argument from the node map.static StringgetString(@NonNull Map<String,Object> nodeMap, @NonNull String contentKey)Returns a value of type string based on the content key specified as an argument from the node map.static StringgetString(@NonNull Map<String,Object> nodeMap, @NonNull ContentKey contentKey)Returns a value of type string based on the content key specified as an argument from the node map.
-
メソッドの詳細
-
getNodeList
public static List<Map<String,Object>> getNodeList(@NonNull @NonNull Map<String,Object> content, @NonNull @NonNull ContentKey contentKey)Returns the list of nodes associated with the specifiedContentKeyfrom the content map.Because it's impossible to avoid warnings when casting with generics, we specify
SuppressWarningswith"unchecked"to thisgetNodeList(Map, ContentKey)method.- パラメータ:
content- The content mapcontentKey- The content key- 戻り値:
- A list of nodes associated with
ContentKey - 例外:
NullPointerException- Ifnullis passed as an argument
-
getNodeMap
public static Map<String,Object> getNodeMap(@NonNull @NonNull Map<String,Object> content, @NonNull @NonNull ContentKey contentKey)Returns the node map associated with the specifiedContentKeyfrom the content map.Because it's impossible to avoid warnings when casting with generics, we specify
SuppressWarningswith"unchecked"to thisgetNodeMap(Map, ContentKey)method.- パラメータ:
content- The content mapcontentKey- The content key- 戻り値:
- A list of nodes associated with
ContentKey - 例外:
NullPointerException- Ifnullis passed as an argument
-
getString
public static String getString(@NonNull @NonNull Map<String,Object> nodeMap, @NonNull @NonNull ContentKey contentKey)Returns a value of type string based on the content key specified as an argument from the node map.- パラメータ:
nodeMap- The node mapcontentKey- The content key- 戻り値:
- A String value tied to a content key stored in the node map
- 例外:
NullPointerException- Ifnullis passed as an argument
-
getString
public static String getString(@NonNull @NonNull Map<String,Object> nodeMap, @NonNull @NonNull String contentKey)Returns a value of type string based on the content key specified as an argument from the node map.- パラメータ:
nodeMap- The node mapcontentKey- The content key- 戻り値:
- A String value tied to a content key stored in the node map
- 例外:
NullPointerException- Ifnullis passed as an argument
-
getObject
public static Object getObject(@NonNull @NonNull Map<String,Object> nodeMap, @NonNull @NonNull String contentKey)Returns a value of type Object based on the content key specified as an argument from the node map.- パラメータ:
nodeMap- The node mapcontentKey- The content key- 戻り値:
- A Object value tied to a content key stored in the node map
- 例外:
NullPointerException- Ifnullis passed as an argument
-