Package com.opengamma.strata.basics
Interface ReferenceDataId<T>
-
- Type Parameters:
T
- the type of the reference data this identifier refers to
- All Known Implementing Classes:
EtdContractSpecId
,HolidayCalendarId
,LegalEntityId
,SecurityId
public interface ReferenceDataId<T>
An identifier for a unique item of reference data.Reference data is obtained from an instance of
ReferenceData
using this identifier.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Class<T>
getReferenceDataType()
Gets the type of data this identifier refers to.default T
queryValueOrNull(ReferenceData refData)
Low-level method to query the reference data value associated with this identifier, returning null if not found.
-
-
-
Method Detail
-
getReferenceDataType
Class<T> getReferenceDataType()
Gets the type of data this identifier refers to.- Returns:
- the type of the reference data this identifier refers to
-
queryValueOrNull
default T queryValueOrNull(ReferenceData refData)
Low-level method to query the reference data value associated with this identifier, returning null if not found.This is a low-level method that obtains the reference data value, returning null instead of an error. Applications should use
ReferenceData.getValue(ReferenceDataId)
in preference to this method.- Parameters:
refData
- the reference data to lookup the value in- Returns:
- the reference data value, null if not found
-
-