class TruckOptionsPanel extends OptionsPanel implements OptionItem.OnChangedListener {

    @SuppressWarnings({"PMD.CyclomaticComplexity"}) // This function is not complicated.
    public void setRouteOptions(final RouteOptions routeOptions) {
        if (routeOptions == null) {
            throw new IllegalArgumentException(getContext().getString(R.string.msdkui_exception_route_options_null));
        }
        mRouteOptions = routeOptions;
        for (final OptionItem item : mSubItem) {
            if (item.getItemId() == R.string.msdkui_height) {
                ((NumericOptionItem) item).setValue(mRouteOptions.getTruckHeight());
            } else if (item.getItemId() == R.string.msdkui_length) {
                ((NumericOptionItem) item).setValue(mRouteOptions.getTruckLength());
            } else if (item.getItemId() == R.string.msdkui_width) {
                ((NumericOptionItem) item).setValue(mRouteOptions.getTruckWidth());
            } else if (item.getItemId() == R.string.msdkui_limited_weight) {
                ((NumericOptionItem) item).setValue(mRouteOptions.getTruckLimitedWeight());
            } else if (item.getItemId() == R.string.msdkui_weight_per_axle) {
                ((NumericOptionItem) item).setValue(mRouteOptions.getTruckWeightPerAxle());
            } else if (item.getItemId() == R.string.msdkui_number_of_trailers) {
                ((NumericOptionItem) item).setInputType(InputType.TYPE_CLASS_NUMBER)
                        .setValue(mRouteOptions.getTruckTrailersCount());
            } else if (item.getItemId() == R.string.msdkui_truck_type) {
                ((SingleChoiceOptionItem) item).selectLabel(getTruckTypeLabel(mRouteOptions.getTruckType()));
            } else if (item.getItemId() == R.string.msdkui_violate_truck_options) {
                setRestriction(item);
            }
        }
    }

    public  TruckOptionsPanel(final Context context);
    public  TruckOptionsPanel(final Context context, final AttributeSet attrs);
    public  TruckOptionsPanel(final Context context, final AttributeSet attrs, final int defStyleAttr);
    @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) public  TruckOptionsPanel(final Context context, final AttributeSet attrs, final int defStyleAttr, final int defStyleRes);

}