Package nz.org.riskscape.engine.lookup
Interface LookupTable
- All Superinterfaces:
SelfDescribingScalarData
A LookupTable is a data source that allows some value to be looked up based on a key. It is assumed that the values are looked up with some kind of indexing.
-
Method Summary
Modifier and TypeMethodDescriptiondefault LookupTableTypedefault TypeReturns the RiskScape type that describes this data when extracted from a project and added in to a pipeline as a scalar value.Lookup a value in this table, or null if there is no value for the given key (or null if the key mapped to null)
-
Method Details
-
getValueType
Type getValueType()- Returns:
- type of values returned by lookups. Note that this shouldn't declare nullable unless keyed values in the table can be null
-
getKeyType
Type getKeyType()- Returns:
- type of keys used to lookup values
-
getLookupTableType
- Returns:
- A
LookupTableTypethat represents thisLookupTable.
-
lookup
Lookup a value in this table, or null if there is no value for the given key (or null if the key mapped to null)
-
getScalarDataType
Description copied from interface:SelfDescribingScalarDataReturns the RiskScape type that describes this data when extracted from a project and added in to a pipeline as a scalar value.
It is referred to as the scalar type to make it clear it's not the same as the
Typeof the data contained within it, e.g. theStructtype of the relation (non-scalar) vsRelationTypethat represents the relation itself (scalar).- Specified by:
getScalarDataTypein interfaceSelfDescribingScalarData
-