public abstract class ReportKey<T>
extends java.lang.Object
Constructor and Description |
---|
ReportKey(ReportMeta meta,
java.lang.Class<T> clazz,
boolean isGeneralInterest)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static ReportKey<java.lang.Double> |
createDoubleKey(ReportMeta meta,
boolean isGeneralInterest)
Constructs a double-precision-valued key.
|
static ReportKey<java.lang.Integer> |
createIntegerKey(ReportMeta meta,
boolean isGeneralInterest)
Constructs an integer-valued key.
|
static ReportKey<java.lang.String> |
createStringKey(ReportMeta meta,
boolean isGeneralInterest)
Constructs a string-valued key.
|
static ReportKey<uk.ac.starlink.table.StarTable> |
createTableKey(ReportMeta meta,
boolean isGeneralInterest)
Constructs a StarTable-valued key.
|
static <T> ReportKey<T> |
createUnprintableKey(ReportMeta meta,
java.lang.Class<T> clazz)
Constructs a non-general-interest key with no useful
text serialization.
|
ReportMeta |
getMeta()
Returns this key's metadata.
|
java.lang.Class<T> |
getValueClass()
Returns the type of object identified by this key.
|
boolean |
isGeneralInterest()
Indicates whether this key represents a key of general interest.
|
abstract java.lang.String |
toText(T value)
Serializes a value associated with this key in a way that
can be presented to a human user.
|
public ReportKey(ReportMeta meta, java.lang.Class<T> clazz, boolean isGeneralInterest)
meta
- metadata describing this keyclazz
- type of data item described by this keyisGeneralInterest
- indicates whether this key represents
a general purpose reportpublic ReportMeta getMeta()
public java.lang.Class<T> getValueClass()
public boolean isGeneralInterest()
public abstract java.lang.String toText(T value)
value
- value for this keypublic static ReportKey<java.lang.String> createStringKey(ReportMeta meta, boolean isGeneralInterest)
meta
- metadata describing the keyisGeneralInterest
- indicates whether the key represents
a general purpose reportpublic static ReportKey<java.lang.Double> createDoubleKey(ReportMeta meta, boolean isGeneralInterest)
meta
- metadata describing the keyisGeneralInterest
- indicates whether the key represents
a general purpose reportpublic static ReportKey<java.lang.Integer> createIntegerKey(ReportMeta meta, boolean isGeneralInterest)
meta
- metadata describing the keyisGeneralInterest
- indicates whether the key represents
a general purpose reportpublic static ReportKey<uk.ac.starlink.table.StarTable> createTableKey(ReportMeta meta, boolean isGeneralInterest)
meta
- metadata describing the keyisGeneralInterest
- indicates whether the key represents
a general purpose reportpublic static <T> ReportKey<T> createUnprintableKey(ReportMeta meta, java.lang.Class<T> clazz)
meta
- metadata describing the keyclazz
- type of data item described by this keyCopyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.