Package org.jfree.report.util

# Class ReportParameters

java.lang.Object
org.jfree.report.util.ReportParameters

All Implemented Interfaces:
  `Serializable`, `Cloneable`

public final class ReportParameters extends Object implements Serializable, Cloneable
The report parameters collection is a map with string keys. The parameters can be used in a query and will appear as part of the datarow.

Author:
  Thomas Morgner
See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`ReportParameters()`
Default constructor.
`ReportParameters(ReportParameters props)`
Copy constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`clear()`
Removes all properties stored in this collection.
`Object`
`clone()`
Clones the properties.
`boolean`
`containsKey(String key)`
Checks whether the given key is stored in this collection of ReportProperties.
`Object`
`get(String key)`
Retrieves the value stored for a key in this properties collection.
`Object`
`get(String key, Object defaultValue)`
Retrieves the value stored for a key in this properties collection, and returning the default value if the key was not stored in this properties collection.
`String[]`
`keys()`
Returns all property keys as array.
`void`
`put(String key, Object value)`
Adds a property to this properties collection.
`int`
`size()`

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

`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ReportParameters

public ReportParameters(ReportParameters props)
Copy constructor.

Parameters:
  `props` - an existing ReportProperties instance.

### ReportParameters

public ReportParameters()
Default constructor.

## Method Details

### put

public void put(String key, Object value)
Adds a property to this properties collection. If a property with the given name exist, the property will be replaced with the new value. If the value is null, the property will be removed.

Parameters:
  `key` - the property key.
  `value` - the property value.

### get

public Object get(String key)
Retrieves the value stored for a key in this properties collection.

Parameters:
  `key` - the property key.
Returns:
  The stored value, or `null` if the key does not exist in this collection.

### get

public Object get(String key, Object defaultValue)
Retrieves the value stored for a key in this properties collection, and returning the default value if the key was not stored in this properties collection.

Parameters:
  `key` - the property key.
  `defaultValue` - the default value to be returned when the key is not stored in this properties collection.
Returns:
  The stored value, or the default value if the key does not exist in this collection.

### keys

public String[] keys()
Returns all property keys as array.

Returns:
  an enumeration of the property keys.

### clear

public void clear()
Removes all properties stored in this collection.

### containsKey

public boolean containsKey(String key)
Checks whether the given key is stored in this collection of ReportProperties.

Parameters:
  `key` - the property key.
Returns:
  true, if the given key is known.

### clone

public Object clone() throws CloneNotSupportedException
Clones the properties.

Overrides:
  `clone` in class `Object`
Returns:
  a copy of this ReportProperties object.
Throws:
  `CloneNotSupportedException` - this should never happen.

### size

public int size()