class RouteUtil {

    public static String getArrivalTime(final Context context, final Route route, final boolean isTraffic) {
        final long tta = getTta(route, isTraffic);
        final Date setArrivalOrDepartureDate = new Date();
        final Date estimatedArrival;
        final RouteOptions.TimeType type = route.getRoutePlan().getRouteOptions().getTime(setArrivalOrDepartureDate);
        if (type == RouteOptions.TimeType.ARRIVAL) {
            estimatedArrival = new Date(setArrivalOrDepartureDate.getTime() - tta);
        } else {
            estimatedArrival = new Date(setArrivalOrDepartureDate.getTime() + tta);
        }
        return DateFormatterUtil.format(context, estimatedArrival);
    }

    private  RouteUtil();

}