uk.ac.starlink.ttools.plot2
Class ReportMap

java.lang.Object
  extended by 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
ReportMap()
          Constructs an empty map.
ReportMap(ReportMap copy)
          Constructs a map with the same content as a given template.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.