Class SegmentReference

  • java.lang.Object
    • com.here.sdk.routing.SegmentReference

  • public final class SegmentReference
    extends java.lang.Object

    Reference 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.Long localId
      Local ID of the segment inside the OCM tile.
      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.
      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.
      java.lang.String segmentId
      Topology segment id representing a unique identifier within the HERE platform catalogs.
      long tilePartitionId
      HERE tile partition id (Morton-encoding + level indicator) of the segment.
      TravelDirection travelDirection
      Travel direction of the segment.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      static SegmentReference fromString​(java.lang.String segmentRef)
      Returns an instance of this struct from a string if it's well-formatted, null otherwise.
      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • 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:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.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, null otherwise.

        Parameters:
        segmentRef -

        The string to parse

        Returns:

        An instance of SegmentReference from a string if it's well-formatted, null otherwise.