uk.ac.starlink.ttools.plot2
Class ReportKey<T>

java.lang.Object
  extended by uk.ac.starlink.ttools.plot2.ReportKey<T>

public class ReportKey<T>
extends Object

Typed key for use in a ReportMap. Instances of this class identify an item of data generated when plotting a layer.

Since:
9 Dec 2014
Author:
Mark Taylor

Constructor Summary
ReportKey(ReportMeta meta, Class<T> clazz, boolean isGeneralInterest)
          Constructor.
 
Method Summary
 ReportMeta getMeta()
          Returns this key's metadata.
 Class<T> getValueClass()
          Returns the type of object identified by this key.
 boolean isGeneralInterest()
          Indicates whether this key represents a key of general interest.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportKey

public ReportKey(ReportMeta meta,
                 Class<T> clazz,
                 boolean isGeneralInterest)
Constructor.

Parameters:
meta - metadata describing this key
clazz - type of data item described by this key
isGeneralInterest - indicates whether this key represents a general purpose report
Method Detail

getMeta

public ReportMeta getMeta()
Returns this key's metadata.

Returns:
descriptive metadata

getValueClass

public Class<T> getValueClass()
Returns the type of object identified by this key.

Returns:
value class

isGeneralInterest

public boolean isGeneralInterest()
Indicates whether this key represents a key of general interest. General interest reports can/should be presented to the user by a general purpose UI as plot feedback and the corresponding values should have a sensible toString implemenatation. If the return value is false, the corresponding report is only intended for plotter-specific code that understands what it's getting.

Returns:
true if general purpose code should present report items to the user in their stringified form


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