类 JobParameters

  • 所有已实现的接口:
    java.io.Serializable

    public class JobParameters
    extends java.lang.Object
    implements java.io.Serializable
    Value object representing runtime parameters to a batch job. Because the parameters have no individual meaning outside of the JobParameters they are contained within, it is a value object rather than an entity. It is also extremely important that a parameters object can be reliably compared to another for equality, in order to determine if one JobParameters object equals another. Furthermore, because these parameters will need to be persisted, it is vital that the types added are restricted. This class is immutable and therefore thread-safe.
    从以下版本开始:
    1.0
    作者:
    Lucas Ward, Michael Minella
    另请参阅:
    序列化表格
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型方法说明
      booleanequals​(java.lang.Object obj) 
      java.util.DategetDate​(java.lang.String key)
      Typesafe Getter for the Date represented by the provided key.
      java.util.DategetDate​(java.lang.String key, java.util.Date defaultValue)
      Typesafe Getter for the Date represented by the provided key.
      java.lang.DoublegetDouble​(java.lang.String key)
      Typesafe Getter for the Long represented by the provided key.
      java.lang.DoublegetDouble​(java.lang.String key, double defaultValue)
      Typesafe Getter for the Double represented by the provided key.
      java.lang.LonggetLong​(java.lang.String key)
      Typesafe Getter for the Long represented by the provided key.
      java.lang.LonggetLong​(java.lang.String key, long defaultValue)
      Typesafe Getter for the Long represented by the provided key.
      java.util.Map<java.lang.String,​JobParameter>getParameters()
      Get a map of all parameters, including string, long, and date.
      java.lang.StringgetString​(java.lang.String key)
      Typesafe Getter for the String represented by the provided key.
      java.lang.StringgetString​(java.lang.String key, java.lang.String defaultValue)
      Typesafe Getter for the String represented by the provided key.
      inthashCode() 
      booleanisEmpty() 
      java.util.PropertiestoProperties() 
      java.lang.StringtoString() 
      • 从类继承的方法 java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 方法详细资料

      • getLong

        public java.lang.Long getLong​(java.lang.String key)
        Typesafe Getter for the Long represented by the provided key.
        参数:
        key - The key to get a value for
        返回:
        The Long value
      • getLong

        public java.lang.Long getLong​(java.lang.String key,
                                      long defaultValue)
        Typesafe Getter for the Long represented by the provided key. If the key does not exist, the default value will be returned.
        参数:
        key - to return the value for
        defaultValue - to return if the value doesn't exist
        返回:
        the parameter represented by the provided key, defaultValue otherwise.
      • getString

        public java.lang.String getString​(java.lang.String key)
        Typesafe Getter for the String represented by the provided key.
        参数:
        key - The key to get a value for
        返回:
        The String value
      • getString

        public java.lang.String getString​(java.lang.String key,
                                          java.lang.String defaultValue)
        Typesafe Getter for the String represented by the provided key. If the key does not exist, the default value will be returned.
        参数:
        key - to return the value for
        defaultValue - to return if the value doesn't exist
        返回:
        the parameter represented by the provided key, defaultValue otherwise.
      • getDouble

        public java.lang.Double getDouble​(java.lang.String key)
        Typesafe Getter for the Long represented by the provided key.
        参数:
        key - The key to get a value for
        返回:
        The Double value
      • getDouble

        public java.lang.Double getDouble​(java.lang.String key,
                                          double defaultValue)
        Typesafe Getter for the Double represented by the provided key. If the key does not exist, the default value will be returned.
        参数:
        key - to return the value for
        defaultValue - to return if the value doesn't exist
        返回:
        the parameter represented by the provided key, defaultValue otherwise.
      • getDate

        public java.util.Date getDate​(java.lang.String key)
        Typesafe Getter for the Date represented by the provided key.
        参数:
        key - The key to get a value for
        返回:
        The java.util.Date value
      • getDate

        public java.util.Date getDate​(java.lang.String key,
                                      java.util.Date defaultValue)
        Typesafe Getter for the Date represented by the provided key. If the key does not exist, the default value will be returned.
        参数:
        key - to return the value for
        defaultValue - to return if the value doesn't exist
        返回:
        the parameter represented by the provided key, defaultValue otherwise.
      • getParameters

        public java.util.Map<java.lang.String,​JobParametergetParameters()
        Get a map of all parameters, including string, long, and date.
        返回:
        an unmodifiable map containing all parameters.
      • isEmpty

        public boolean isEmpty()
        返回:
        true if the parameters is empty, false otherwise.
      • equals

        public boolean equals​(java.lang.Object obj)
        覆盖:
        equals 在类中 java.lang.Object
      • hashCode

        public int hashCode()
        覆盖:
        hashCode 在类中 java.lang.Object
      • toString

        public java.lang.String toString()
        覆盖:
        toString 在类中 java.lang.Object