Class SegmentReferenceConverter
A SegmentReferenceConverter provides possibility to convert mapmatched instances of
SegmentReference to corresponding instances of DirectedOCMSegmentId.
Note: Loading map data can be time-consuming, so SegmentReferenceConverter can be used
in a background thread to avoid blocking the main thread. However, this class is not
thread-safe, and each instance should be used exclusively by a single thread.
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.
-
Constructor Summary
ConstructorsConstructorDescriptionSegmentReferenceConverter(SDKNativeEngine sdkEngine) Creates a new instance of this class. -
Method Summary
Modifier and TypeMethodDescriptiongetLocalSegmentId(SegmentReference segmentReference) TheDirectedLocalSegmentIdfor providedSegmentReference.getOCMSegmentId(SegmentReference segmentReference) Deprecated.Will be removed in v4.30.0.
-
Constructor Details
-
SegmentReferenceConverter
public SegmentReferenceConverter(@NonNull SDKNativeEngine sdkEngine) throws InstantiationErrorException Creates a new instance of this class.
- Parameters:
sdkEngine-A SDKEngine instance.
- Throws:
InstantiationErrorException-Indicates what went wrong when the instantiation was attempted.
-
-
Method Details
-
getOCMSegmentId
@Deprecated @Nullable public DirectedOCMSegmentId getOCMSegmentId(@NonNull SegmentReference segmentReference) Deprecated.Will be removed in v4.30.0. Use
getLocalSegmentId()instead.The
DirectedOCMSegmentIdfor providedSegmentReference.- Parameters:
segmentReference-SegmentReferenceto convert.- Returns:
DirectedOCMSegmentIdcorresponding to providedSegmentReference.
-
getLocalSegmentId
@Nullable public DirectedLocalSegmentId getLocalSegmentId(@NonNull SegmentReference segmentReference) The
DirectedLocalSegmentIdfor providedSegmentReference.- Parameters:
segmentReference-SegmentReferenceto convert.- Returns:
DirectedLocalSegmentIdcorresponding to providedSegmentReference.
-