Package org.springframework.cloud.task.batch.listener.support

# Class JobParametersEvent

java.lang.Object
org.springframework.cloud.task.batch.listener.support.JobParametersEvent

public class JobParametersEvent extends Object
This is a JobParametersEvent DTO created so that a `JobParameters` can be serialized into Json without having to add mixins to an ObjectMapper.

Author:
  Glenn Renfro

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JobParametersEvent()`
  `JobParametersEvent(Map<String,org.springframework.batch.core.JobParameter> jobParameters)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `Date`
  `getDate(String key)`
  Typesafe Getter for the Date represented by the provided key.
  `Date`
  `getDate(String key, Date defaultValue)`
  Typesafe Getter for the Date represented by the provided key.
  `Double`
  `getDouble(String key)`
  Typesafe Getter for the Long represented by the provided key.
  `Double`
  `getDouble(String key, double defaultValue)`
  Typesafe Getter for the Double represented by the provided key.
  `Long`
  `getLong(String key)`
  Typesafe Getter for the Long represented by the provided key.
  `Long`
  `getLong(String key, long defaultValue)`
  Typesafe Getter for the Long represented by the provided key.
  `Map<String,JobParameterEvent>`
  `getParameters()`
  Get a map of all parameters, including string, long, and date.
  `String`
  `getString(String key)`
  Typesafe Getter for the String represented by the provided key.
  `String`
  `getString(String key, String defaultValue)`
  Typesafe Getter for the String represented by the provided key.
  `int`
  `hashCode()`
  `boolean`
  `isEmpty()`
  `Properties`
  `toProperties()`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### JobParametersEvent

    public JobParametersEvent()

  - ### JobParametersEvent

    public JobParametersEvent(Map<String,org.springframework.batch.core.JobParameter> jobParameters)

- ## Method Details

  - ### getLong

    public Long getLong(String key)
    Typesafe Getter for the Long represented by the provided key.
    Parameters:
      `key` - The key to get a value for
    Returns:
      The `Long` value

  - ### getLong

    public Long getLong(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.
    Parameters:
      `key` - to return the value for
      `defaultValue` - to return if the value doesn't exist
    Returns:
      the parameter represented by the provided key, defaultValue otherwise.

  - ### getString

    public String getString(String key)
    Typesafe Getter for the String represented by the provided key.
    Parameters:
      `key` - The key to get a value for
    Returns:
      The `String` value

  - ### getString

    public String getString(String key, String defaultValue)
    Typesafe Getter for the String represented by the provided key. If the key does not exist, the default value will be returned.
    Parameters:
      `key` - to return the value for
      `defaultValue` - to return if the value doesn't exist
    Returns:
      the parameter represented by the provided key, defaultValue otherwise.

  - ### getDouble

    public Double getDouble(String key)
    Typesafe Getter for the Long represented by the provided key.
    Parameters:
      `key` - The key to get a value for
    Returns:
      The `Double` value

  - ### getDouble

    public Double getDouble(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.
    Parameters:
      `key` - to return the value for
      `defaultValue` - to return if the value doesn't exist
    Returns:
      the parameter represented by the provided key, defaultValue otherwise.

  - ### getDate

    public Date getDate(String key)
    Typesafe Getter for the Date represented by the provided key.
    Parameters:
      `key` - The key to get a value for
    Returns:
      The `java.util.Date` value

  - ### getDate

    public Date getDate(String key, Date defaultValue)
    Typesafe Getter for the Date represented by the provided key. If the key does not exist, the default value will be returned.
    Parameters:
      `key` - to return the value for
      `defaultValue` - to return if the value doesn't exist
    Returns:
      the parameter represented by the provided key, defaultValue otherwise.

  - ### getParameters

    public Map<String,JobParameterEvent> getParameters()
    Get a map of all parameters, including string, long, and date.
    Returns:
      an unmodifiable map containing all parameters.

  - ### isEmpty

    public boolean isEmpty()
    Returns:
      true if the parameters is empty, false otherwise.

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### toProperties

    public Properties toProperties()