パッケージ 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
  • メソッドの詳細

    • 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 specified ContentKey from the content map.

      Because it's impossible to avoid warnings when casting with generics, we specify SuppressWarnings with "unchecked" to this getNodeList(Map, ContentKey) method.

      パラメータ:
      content - The content map
      contentKey - The content key
      戻り値:
      A list of nodes associated with ContentKey
      例外:
      NullPointerException - If null is 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 specified ContentKey from the content map.

      Because it's impossible to avoid warnings when casting with generics, we specify SuppressWarnings with "unchecked" to this getNodeMap(Map, ContentKey) method.

      パラメータ:
      content - The content map
      contentKey - The content key
      戻り値:
      A list of nodes associated with ContentKey
      例外:
      NullPointerException - If null is 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 map
      contentKey - The content key
      戻り値:
      A String value tied to a content key stored in the node map
      例外:
      NullPointerException - If null is 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 map
      contentKey - The content key
      戻り値:
      A String value tied to a content key stored in the node map
      例外:
      NullPointerException - If null is 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 map
      contentKey - The content key
      戻り値:
      A Object value tied to a content key stored in the node map
      例外:
      NullPointerException - If null is passed as an argument