# Class ReportMap

java.lang.Object
uk.ac.starlink.ttools.plot2.ReportMap

public class ReportMap extends Object
Map containing typed entries generated as a result of plotting. The sequence in which entries are added is significant; general interest entries should be added in the order in which it makes sense for a UI to present them to the user.

Since:
  9 Dec 2014
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`ReportMap()`
Constructs an empty map.
`ReportMap(ReportMap copy)`
Constructs a map with the same content as a given template.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`<T> T`
`get(ReportKey<T> key)`
Retrieves an entry.
`int`
`hashCode()`
`Set<ReportKey<?>>`
`keySet()`
Returns an ordered set of the keys actually present in this map.
`<T> void`
`put(ReportKey<T> key, T value)`
Sets an entry.
`void`
`putAll(ReportMap report)`
Copies all the entries from a given map into this map.
`String`
`toString()`
`String`
`toString(boolean includeAll)`
Returns a string representation of this map, with an option to include or exclude the non-general-interest entries.

### Methods inherited from class Object

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

## Constructor Details

### ReportMap

public ReportMap()
Constructs an empty map.

### ReportMap

public ReportMap(ReportMap copy)
Constructs a map with the same content as a given template.

Parameters:
  `copy` - map whose contents are to be copied

## Method Details

### put

public <T> void put(ReportKey<T> key, T value)
Sets an entry.

Parameters:
  `key` - key
  `value` - value

### putAll

public void putAll(ReportMap report)
Copies all the entries from a given map into this map.

Parameters:
  `report` - map to copy

### get

public <T> T get(ReportKey<T> key)
Retrieves an entry.

Parameters:
  `key` - key
Returns:
  associated value; if no entry present, null is returned

### keySet

public Set<ReportKey<?>> keySet()
Returns an ordered set of the keys actually present in this map. The sequence is the order in which entries were set.

Returns:
  list of keys

### toString

public String toString(boolean includeAll)
Returns a string representation of this map, with an option to include or exclude the non-general-interest entries.

Parameters:
  `includeAll` - true to include all entries, false to include only general-interest entries
Returns:
  string representation of this map, zero-length if there are no items of interest

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### toString

public String toString()

Overrides:
  `toString` in class `Object`