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 LookupTableType
default Type
Returns 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
LookupTableType
that 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:SelfDescribingScalarData
Returns 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
Type
of the data contained within it, e.g. theStruct
type of the relation (non-scalar) vsRelationType
that represents the relation itself (scalar).- Specified by:
getScalarDataType
in interfaceSelfDescribingScalarData
-