Class DictionaryUtils


  • public class DictionaryUtils
    extends java.lang.Object
    Provides helper utilities to handle Dictionarys.
    • Constructor Summary

      Constructors 
      Constructor Description
      DictionaryUtils()  
    • Method Summary

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

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

      • DictionaryUtils

        public DictionaryUtils()
    • Method Detail

      • getAsString

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

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

        public static java.lang.Integer getAsInteger​(java.util.Dictionary<java.lang.String,​java.lang.Object> dict,
                                                     java.lang.String key)
        Get the Dictionary value as Integer.
        Parameters:
        dict - the Dictionary
        key - the identifier key
        Returns:
        the value as Integer
      • getAsOptionalInteger

        public static java.util.Optional<java.lang.Integer> getAsOptionalInteger​(java.util.Dictionary<java.lang.String,​java.lang.Object> dict,
                                                                                 java.lang.String key)
        Get the Dictionary value as Optional Integer.
        Parameters:
        dict - the Dictionary
        key - the identifier key
        Returns:
        the value as Optional Integer
      • getAsBoolean

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

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