Class MapUtils


  • public class MapUtils
    extends java.lang.Object
    Provides helper utilities to handle Maps.
    • Constructor Summary

      Constructors 
      Constructor Description
      MapUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Boolean getAsBoolean​(java.util.Map<java.lang.String,​java.lang.Object> map, java.lang.String key)
      Get the Map value as Boolean.
      static java.util.Optional<java.lang.Boolean> getAsOptionalBoolean​(java.util.Map<java.lang.String,​java.lang.Object> map, java.lang.String key)
      Get the Map value as Optional Boolean.
      static java.util.Optional<java.lang.String> getAsOptionalString​(java.util.Map<java.lang.String,​java.lang.Object> map, java.lang.String key)
      Get the Map value as Optional String.
      static java.lang.String getAsString​(java.util.Map<java.lang.String,​java.lang.Object> map, java.lang.String key)
      Get the Map value as String.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MapUtils

        public MapUtils()
    • Method Detail

      • getAsString

        public static java.lang.String getAsString​(java.util.Map<java.lang.String,​java.lang.Object> map,
                                                   java.lang.String key)
        Get the Map value as String.
        Parameters:
        map - the Map
        key - the identifier key
        Returns:
        the value as String
      • getAsOptionalString

        public static java.util.Optional<java.lang.String> getAsOptionalString​(java.util.Map<java.lang.String,​java.lang.Object> map,
                                                                               java.lang.String key)
        Get the Map value as Optional String.
        Parameters:
        map - the Map
        key - the identifier key
        Returns:
        the value as Optional String
      • getAsBoolean

        public static java.lang.Boolean getAsBoolean​(java.util.Map<java.lang.String,​java.lang.Object> map,
                                                     java.lang.String key)
        Get the Map value as Boolean.
        Parameters:
        map - the Map
        key - the identifier key
        Returns:
        the value as Integer
      • getAsOptionalBoolean

        public static java.util.Optional<java.lang.Boolean> getAsOptionalBoolean​(java.util.Map<java.lang.String,​java.lang.Object> map,
                                                                                 java.lang.String key)
        Get the Map value as Optional Boolean.
        Parameters:
        map - the Map
        key - the identifier key
        Returns:
        the value as Optional Integer