Class ArgumentsUtil


  • public final class ArgumentsUtil
    extends java.lang.Object
    A utility class to extract data from model's arguments.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean booleanValue​(java.util.Map<java.lang.String,​?> arguments, java.lang.String key)
      Returns the boolean value from the arguments.
      static boolean booleanValue​(java.util.Map<java.lang.String,​?> arguments, java.lang.String key, boolean def)
      Returns the boolean value from the arguments.
      static float floatValue​(java.util.Map<java.lang.String,​?> arguments, java.lang.String key)
      Returns the float value from the arguments.
      static float floatValue​(java.util.Map<java.lang.String,​?> arguments, java.lang.String key, float def)
      Returns the float value from the arguments.
      static int intValue​(java.util.Map<java.lang.String,​?> arguments, java.lang.String key)
      Returns the integer value from the arguments.
      static int intValue​(java.util.Map<java.lang.String,​?> arguments, java.lang.String key, int def)
      Returns the integer value from the arguments.
      static long longValue​(java.util.Map<java.lang.String,​?> arguments, java.lang.String key)
      Returns the long value from the arguments.
      static java.lang.Long longValue​(java.util.Map<java.lang.String,​?> arguments, java.lang.String key, long def)
      Returns the long value from the arguments.
      static java.lang.String stringValue​(java.util.Map<java.lang.String,​?> arguments, java.lang.String key)
      Returns the string value from the arguments.
      static java.lang.String stringValue​(java.util.Map<java.lang.String,​?> arguments, java.lang.String key, java.lang.String def)
      Returns the string value from the arguments.
      • Methods inherited from class java.lang.Object

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

      • stringValue

        public static java.lang.String stringValue​(java.util.Map<java.lang.String,​?> arguments,
                                                   java.lang.String key)
        Returns the string value from the arguments.
        Parameters:
        arguments - the arguments to retrieve data
        key - the key to retrieve
        Returns:
        the string value form the arguments
      • stringValue

        public static java.lang.String stringValue​(java.util.Map<java.lang.String,​?> arguments,
                                                   java.lang.String key,
                                                   java.lang.String def)
        Returns the string value from the arguments.
        Parameters:
        arguments - the arguments to retrieve data
        key - the key to retrieve
        def - the default value if key is absent
        Returns:
        the string value form the arguments
      • intValue

        public static int intValue​(java.util.Map<java.lang.String,​?> arguments,
                                   java.lang.String key)
        Returns the integer value from the arguments.
        Parameters:
        arguments - the arguments to retrieve data
        key - the key to retrieve
        Returns:
        the integer value form the arguments
      • intValue

        public static int intValue​(java.util.Map<java.lang.String,​?> arguments,
                                   java.lang.String key,
                                   int def)
        Returns the integer value from the arguments.
        Parameters:
        arguments - the arguments to retrieve data
        key - the key to retrieve
        def - the default value if key is absent
        Returns:
        the integer value form the arguments
      • longValue

        public static long longValue​(java.util.Map<java.lang.String,​?> arguments,
                                     java.lang.String key)
        Returns the long value from the arguments.
        Parameters:
        arguments - the arguments to retrieve data
        key - the key to retrieve
        Returns:
        the long value form the arguments
      • longValue

        public static java.lang.Long longValue​(java.util.Map<java.lang.String,​?> arguments,
                                               java.lang.String key,
                                               long def)
        Returns the long value from the arguments.
        Parameters:
        arguments - the arguments to retrieve data
        key - the key to retrieve
        def - the default value if key is absent
        Returns:
        the long value form the arguments
      • floatValue

        public static float floatValue​(java.util.Map<java.lang.String,​?> arguments,
                                       java.lang.String key)
        Returns the float value from the arguments.
        Parameters:
        arguments - the arguments to retrieve data
        key - the key to retrieve
        Returns:
        the float value form the arguments
      • floatValue

        public static float floatValue​(java.util.Map<java.lang.String,​?> arguments,
                                       java.lang.String key,
                                       float def)
        Returns the float value from the arguments.
        Parameters:
        arguments - the arguments to retrieve data
        key - the key to retrieve
        def - the default value if key is absent
        Returns:
        the float value form the arguments
      • booleanValue

        public static boolean booleanValue​(java.util.Map<java.lang.String,​?> arguments,
                                           java.lang.String key)
        Returns the boolean value from the arguments.
        Parameters:
        arguments - the arguments to retrieve data
        key - the key to retrieve
        Returns:
        the boolean value form the arguments
      • booleanValue

        public static boolean booleanValue​(java.util.Map<java.lang.String,​?> arguments,
                                           java.lang.String key,
                                           boolean def)
        Returns the boolean value from the arguments.
        Parameters:
        arguments - the arguments to retrieve data
        key - the key to retrieve
        def - the default value if key is absent
        Returns:
        the boolean value form the arguments