Class SegmentReference
Class SegmentReference
- java.lang.Object
-
- com.here.sdk.routing.SegmentReference
-
public final class SegmentReference extends java.lang.ObjectReference to a segment id with a travel direction.
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.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.LonglocalIdLocal ID of the segment inside the OCM tile.doubleoffsetEndThe end offset is a non-negative number between 0 and 1, representing the end of the referenced range using a proportion of the length of the segment.doubleoffsetStartThe start offset is a non-negative number between 0 and 1, representing the start of the referenced range using a proportion of the length of the segment.java.lang.StringsegmentIdTopology segment id representing a unique identifier within the HERE platform catalogs.longtilePartitionIdHERE tile partition id (Morton-encoding + level indicator) of the segment.TravelDirectiontravelDirectionTravel direction of the segment.
-
Constructor Summary
Constructors Constructor Description SegmentReference()Creates a new instance.SegmentReference(java.lang.String segmentId)Creates a new instance.SegmentReference(java.lang.String segmentId, TravelDirection travelDirection)Creates a new instance.SegmentReference(java.lang.String segmentId, TravelDirection travelDirection, double offsetStart)Creates a new instance.SegmentReference(java.lang.String segmentId, TravelDirection travelDirection, double offsetStart, double offsetEnd)Creates a new instance.SegmentReference(java.lang.String segmentId, TravelDirection travelDirection, double offsetStart, double offsetEnd, long tilePartitionId)Creates a new instance.SegmentReference(java.lang.String segmentId, TravelDirection travelDirection, double offsetStart, double offsetEnd, long tilePartitionId, java.lang.Long localId)Creates a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)static SegmentReferencefromString(java.lang.String segmentRef)Returns an instance of this struct from a string if it's well-formatted,nullotherwise.inthashCode()
-
-
-
Field Detail
-
segmentId
@NonNull public java.lang.String segmentId
Topology segment id representing a unique identifier within the HERE platform catalogs.
-
travelDirection
@NonNull public TravelDirection travelDirection
Travel direction of the segment.
-
offsetStart
public double offsetStart
The start offset is a non-negative number between 0 and 1, representing the start of the referenced range using a proportion of the length of the segment. 0 represents the start and 1 the end of the segment, relative to the indicated direction (or positive direction in case of undirected segments)
-
offsetEnd
public double offsetEnd
The end offset is a non-negative number between 0 and 1, representing the end of the referenced range using a proportion of the length of the segment. 0 represents the start and 1 the end of the segment, relative to the indicated direction (or positive direction in case of undirected segments)
-
tilePartitionId
public long tilePartitionId
HERE tile partition id (Morton-encoding + level indicator) of the segment. As in HERE Map Content.
-
localId
@Nullable public java.lang.Long localId
Local ID of the segment inside the OCM tile.
-
-
Constructor Detail
-
SegmentReference
public SegmentReference()
Creates a new instance.
-
SegmentReference
public SegmentReference(@NonNull java.lang.String segmentId)Creates a new instance.
- Parameters:
segmentId-Topology segment id representing a unique identifier within the HERE platform catalogs.
-
SegmentReference
public SegmentReference(@NonNull java.lang.String segmentId, @NonNull TravelDirection travelDirection)Creates a new instance.
- Parameters:
segmentId-Topology segment id representing a unique identifier within the HERE platform catalogs.
travelDirection-Travel direction of the segment.
-
SegmentReference
public SegmentReference(@NonNull java.lang.String segmentId, @NonNull TravelDirection travelDirection, double offsetStart)Creates a new instance.
- Parameters:
segmentId-Topology segment id representing a unique identifier within the HERE platform catalogs.
travelDirection-Travel direction of the segment.
offsetStart-The start offset is a non-negative number between 0 and 1, representing the start of the referenced range using a proportion of the length of the segment. 0 represents the start and 1 the end of the segment, relative to the indicated direction (or positive direction in case of undirected segments)
-
SegmentReference
public SegmentReference(@NonNull java.lang.String segmentId, @NonNull TravelDirection travelDirection, double offsetStart, double offsetEnd)Creates a new instance.
- Parameters:
segmentId-Topology segment id representing a unique identifier within the HERE platform catalogs.
travelDirection-Travel direction of the segment.
offsetStart-The start offset is a non-negative number between 0 and 1, representing the start of the referenced range using a proportion of the length of the segment. 0 represents the start and 1 the end of the segment, relative to the indicated direction (or positive direction in case of undirected segments)
offsetEnd-The end offset is a non-negative number between 0 and 1, representing the end of the referenced range using a proportion of the length of the segment. 0 represents the start and 1 the end of the segment, relative to the indicated direction (or positive direction in case of undirected segments)
-
SegmentReference
public SegmentReference(@NonNull java.lang.String segmentId, @NonNull TravelDirection travelDirection, double offsetStart, double offsetEnd, long tilePartitionId)Creates a new instance.
- Parameters:
segmentId-Topology segment id representing a unique identifier within the HERE platform catalogs.
travelDirection-Travel direction of the segment.
offsetStart-The start offset is a non-negative number between 0 and 1, representing the start of the referenced range using a proportion of the length of the segment. 0 represents the start and 1 the end of the segment, relative to the indicated direction (or positive direction in case of undirected segments)
offsetEnd-The end offset is a non-negative number between 0 and 1, representing the end of the referenced range using a proportion of the length of the segment. 0 represents the start and 1 the end of the segment, relative to the indicated direction (or positive direction in case of undirected segments)
tilePartitionId-HERE tile partition id (Morton-encoding + level indicator) of the segment. As in HERE Map Content.
-
SegmentReference
public SegmentReference(@NonNull java.lang.String segmentId, @NonNull TravelDirection travelDirection, double offsetStart, double offsetEnd, long tilePartitionId, @Nullable java.lang.Long localId)Creates a new instance.
- Parameters:
segmentId-Topology segment id representing a unique identifier within the HERE platform catalogs.
travelDirection-Travel direction of the segment.
offsetStart-The start offset is a non-negative number between 0 and 1, representing the start of the referenced range using a proportion of the length of the segment. 0 represents the start and 1 the end of the segment, relative to the indicated direction (or positive direction in case of undirected segments)
offsetEnd-The end offset is a non-negative number between 0 and 1, representing the end of the referenced range using a proportion of the length of the segment. 0 represents the start and 1 the end of the segment, relative to the indicated direction (or positive direction in case of undirected segments)
tilePartitionId-HERE tile partition id (Morton-encoding + level indicator) of the segment. As in HERE Map Content.
localId-Local ID of the segment inside the OCM tile.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
fromString
@Nullable public static SegmentReference fromString(@NonNull java.lang.String segmentRef)
Returns an instance of this struct from a string if it's well-formatted,
nullotherwise.- Parameters:
segmentRef-The string to parse
- Returns:
An instance of
SegmentReferencefrom a string if it's well-formatted,nullotherwise.
-
-