com.here.msdkui.routing

## Class RouteBarScaler

- java.lang.Object
- - com.here.msdkui.routing.RouteBarScaler

-     public final class RouteBarScaler
      extends java.lang.Object

  A class to calculate scale factors to scale the width of a `SectionBar` of a `RouteDescriptionItem`. The scale factor is in the range [0, 1] and is proportional compared to the longest route which has a factor of 1.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RouteBarScaler()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `float` | `getScaling(com.here.android.mpa.routing.Route input)` Gets the scale factor for the given route.
    `java.util.Map<com.here.android.mpa.routing.Route,java.lang.Float>` | `scaleRoutes(java.util.Collection<com.here.android.mpa.routing.Route> routes)` Calculates the scale factors for the provided routes.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RouteBarScaler

          public RouteBarScaler()

  - ### Method Detail

    - #### scaleRoutes

          public java.util.Map<com.here.android.mpa.routing.Route,java.lang.Float> scaleRoutes(java.util.Collection<com.here.android.mpa.routing.Route> routes)

      Calculates the scale factors for the provided routes. The scale factors are relative to the longest duration of a route and can be used to scale the length of the `SectionBar`.
      Parameters:
        `routes` - the routes that should be compared to find the relative scale factor for each route.
      Returns:
        a map providing a scale factor for each route.

    - #### getScaling

          public float getScaling(com.here.android.mpa.routing.Route input)

      Gets the scale factor for the given route. Should be called after the relative scale factors for a collection of routes have been calculated.
      Parameters:
        `input` - the route
      Returns:
        the scale factor for the provided route or 1, if the scale factor was not calculated before.