VehicleSpecification.TaxiBuilder (API Reference)
Class VehicleSpecification.TaxiBuilder
- Enclosing class:
- VehicleSpecification
This class constructs a VehicleSpecification for a taxi.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theVehicleSpecificationobject forTransportMode.TAXIwith the specifications taken from theVehicleSpecification.TaxiBuilderobject.withAxleCount(int axleCount) Sets the vehicle axle count.withCurrentWeightInKilograms(int currentWeightInKilograms) Sets the vehicle current weight in kilograms.withEmptyWeightInKilograms(int emptyWeightInKilograms) Sets the vehicle empty weight in kilograms.withEngineSizeInCubicCentimeters(int engineSizeInCubicCentimeters) Sets the vehicle engine size in cubic centimeters.withGrossWeightInKilograms(int grossWeightInKilograms) Sets the vehicle gross weight in kilograms.withHeightInCentimeters(int heightInCentimeters) Sets the vehicle height in centimeters.withIsCommercial(boolean isCommercial) Sets the vehicle is commercial flag.withKingpinToRearAxleDistanceInCentimeters(int length) Sets the vehicle kingpin to rear axle distance.withLastCharacterOfLicensePlate(String lastCharacterOfLicensePlate) Sets the vehicle last character of the license plate.withLengthInCentimeters(int lengthInCentimeters) Sets the vehicle length in centimeters.withOccupancy(int occupancy) Sets the vehicle occupants number.withPayloadCapacityInKilograms(int payloadCapacityInKilograms) Sets the vehicle payload capacity in kilograms.withTiresCount(int tiresCount) Sets the vehicle tires count.withTrailerAxleCount(int trailerAxleCount) Sets the vehicle trailer axle count.withTrailerCount(int trailerCount) Sets the vehicle trailer count.withTunnelCategory(TunnelCategory tunnelCategory) Sets the vehicle tunnel category.withWeightPerAxleInKilograms(int weightPerAxleInKilograms) Sets the vehicle weight per axle in kilograms.withWidthInCentimeters(int widthInCentimeters) Sets the vehicle width in centimeters.
-
Constructor Details
-
TaxiBuilder
public TaxiBuilder()Creates a new instance of this class.
-
-
Method Details
-
withHeightInCentimeters
Sets the vehicle height in centimeters.
- Parameters:
heightInCentimeters-The vehicle height in centimeters.
- Returns:
The
VehicleSpecification.TaxiBuilderobject with the vehicle height set to the new value.
-
withWidthInCentimeters
Sets the vehicle width in centimeters.
- Parameters:
widthInCentimeters-The vehicle width in centimeters.
- Returns:
The
VehicleSpecification.TaxiBuilderobject with the vehicle width set to the new value.
-
withLengthInCentimeters
Sets the vehicle length in centimeters.
- Parameters:
lengthInCentimeters-The vehicle length in centimeters.
- Returns:
The
VehicleSpecification.TaxiBuilderobject with the vehicle length set to the new value.
-
withAxleCount
Sets the vehicle axle count.
- Parameters:
axleCount-The vehicle axle count.
- Returns:
The
VehicleSpecification.TaxiBuilderobject with the axle count set to the new value.
-
withKingpinToRearAxleDistanceInCentimeters
@NonNull public VehicleSpecification.TaxiBuilder withKingpinToRearAxleDistanceInCentimeters(int length) Sets the vehicle kingpin to rear axle distance.
- Parameters:
length-The distance from kingpin to the rear axle.
- Returns:
The
VehicleSpecification.TaxiBuilderobject with the kingpin to rear axle set to the new value.
-
withTrailerCount
Sets the vehicle trailer count.
- Parameters:
trailerCount-The vehicle trailer count.
- Returns:
The
VehicleSpecification.TaxiBuilderobject with the trailer count set to the new value.
-
withPayloadCapacityInKilograms
@NonNull public VehicleSpecification.TaxiBuilder withPayloadCapacityInKilograms(int payloadCapacityInKilograms) Sets the vehicle payload capacity in kilograms.
- Parameters:
payloadCapacityInKilograms-The vehicle payload capacity in kilograms.
- Returns:
The
VehicleSpecification.TaxiBuilderobject with the payload capacity set to the new value.
-
withTrailerAxleCount
Sets the vehicle trailer axle count.
- Parameters:
trailerAxleCount-The vehicle trailer axle count.
- Returns:
The
VehicleSpecification.TaxiBuilderobject with the trailer axle count set to the new value.
-
withGrossWeightInKilograms
@NonNull public VehicleSpecification.TaxiBuilder withGrossWeightInKilograms(int grossWeightInKilograms) Sets the vehicle gross weight in kilograms.
- Parameters:
grossWeightInKilograms-The vehicle gross weight in kilograms.
- Returns:
The
VehicleSpecification.TaxiBuilderobject with the gross weight set to the new value.
-
withCurrentWeightInKilograms
@NonNull public VehicleSpecification.TaxiBuilder withCurrentWeightInKilograms(int currentWeightInKilograms) Sets the vehicle current weight in kilograms.
- Parameters:
currentWeightInKilograms-The vehicle current weight in kilograms.
- Returns:
The
VehicleSpecification.TaxiBuilderobject with the current weight set to the new value.
-
withEmptyWeightInKilograms
@NonNull public VehicleSpecification.TaxiBuilder withEmptyWeightInKilograms(int emptyWeightInKilograms) Sets the vehicle empty weight in kilograms.
- Parameters:
emptyWeightInKilograms-The vehicle empty weight in kilograms.
- Returns:
The
VehicleSpecification.TaxiBuilderobject with the empty weight set to the new value.
-
withWeightPerAxleInKilograms
@NonNull public VehicleSpecification.TaxiBuilder withWeightPerAxleInKilograms(int weightPerAxleInKilograms) Sets the vehicle weight per axle in kilograms.
- Parameters:
weightPerAxleInKilograms-The vehicle weight per axle in kilograms.
- Returns:
The
VehicleSpecification.TaxiBuilderobject with the current weight per axle set to the new value.
-
withIsCommercial
Sets the vehicle is commercial flag.
- Parameters:
isCommercial-The vehicle is commercial flag.
- Returns:
The
VehicleSpecification.TaxiBuilderobject with the is commercial flag set to the new value.
-
withLastCharacterOfLicensePlate
@NonNull public VehicleSpecification.TaxiBuilder withLastCharacterOfLicensePlate(@NonNull String lastCharacterOfLicensePlate) Sets the vehicle last character of the license plate.
- Parameters:
lastCharacterOfLicensePlate-The vehicle last character of the license plate.
- Returns:
The
VehicleSpecification.TaxiBuilderobject with the last character of the licence plate set to the new value.
-
withEngineSizeInCubicCentimeters
@NonNull public VehicleSpecification.TaxiBuilder withEngineSizeInCubicCentimeters(int engineSizeInCubicCentimeters) Sets the vehicle engine size in cubic centimeters.
- Parameters:
engineSizeInCubicCentimeters-The vehicle engine size in cubic centimeters.
- Returns:
The
VehicleSpecification.TaxiBuilderobject with the engine size set to the new value.
-
withTiresCount
Sets the vehicle tires count.
- Parameters:
tiresCount-The vehicle tires count.
- Returns:
The
VehicleSpecification.TaxiBuilderobject with the vehicle tires count set to the new value.
-
withTunnelCategory
@NonNull public VehicleSpecification.TaxiBuilder withTunnelCategory(@NonNull TunnelCategory tunnelCategory) Sets the vehicle tunnel category.
- Parameters:
tunnelCategory-The vehicle tunnel category.
- Returns:
The
VehicleSpecification.TaxiBuilderobject with the vehicle tunnel category set to the new value.
-
withOccupancy
Sets the vehicle occupants number.
- Parameters:
occupancy-The vehicle occupants number.
- Returns:
The
VehicleSpecification.TaxiBuilderobject with the vehicle occupants number set to the new value.
-
build
Builds the
VehicleSpecificationobject forTransportMode.TAXIwith the specifications taken from theVehicleSpecification.TaxiBuilderobject.- Returns:
The
VehicleSpecificationobject created from theVehicleSpecification.TaxiBuilderobject.
-