public abstract class ReportKey<T> extends Object
Constructor and Description |
---|
ReportKey(ReportMeta meta,
Class<T> clazz,
boolean isGeneralInterest)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static ReportKey<Double> |
createDoubleKey(ReportMeta meta,
boolean isGeneralInterest)
Constructs a double-precision-valued key.
|
static ReportKey<Integer> |
createIntegerKey(ReportMeta meta,
boolean isGeneralInterest)
Constructs an integer-valued key.
|
static <T> ReportKey<T> |
createObjectKey(ReportMeta meta,
Class<T> clazz,
boolean isGeneralInterest)
Constructs a typed key with default stringification.
|
static ReportKey<String> |
createStringKey(ReportMeta meta,
boolean isGeneralInterest)
Constructs a string-valued key.
|
static ReportKey<StarTable> |
createTableKey(ReportMeta meta,
boolean isGeneralInterest)
Constructs a StarTable-valued key.
|
static <T> ReportKey<T> |
createUnprintableKey(ReportMeta meta,
Class<T> clazz)
Constructs a non-general-interest key with no useful
text serialization.
|
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.
|
abstract 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, 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 Class<T> getValueClass()
public boolean isGeneralInterest()
public abstract String toText(T value)
value
- value for this keypublic static ReportKey<String> createStringKey(ReportMeta meta, boolean isGeneralInterest)
meta
- metadata describing the keyisGeneralInterest
- indicates whether the key represents
a general purpose reportpublic static ReportKey<Double> createDoubleKey(ReportMeta meta, boolean isGeneralInterest)
meta
- metadata describing the keyisGeneralInterest
- indicates whether the key represents
a general purpose reportpublic static ReportKey<Integer> createIntegerKey(ReportMeta meta, boolean isGeneralInterest)
meta
- metadata describing the keyisGeneralInterest
- indicates whether the key represents
a general purpose reportpublic static <T> ReportKey<T> createObjectKey(ReportMeta meta, 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 static ReportKey<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, Class<T> clazz)
meta
- metadata describing the keyclazz
- type of data item described by this keyCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.