public static final class ShipmentModel.DurationDistanceMatrix.Row.Builder extends GeneratedMessageV3.Builder<ShipmentModel.DurationDistanceMatrix.Row.Builder> implements ShipmentModel.DurationDistanceMatrix.RowOrBuilder
Specifies a row of the duration and distance matrix.
Protobuf type google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addAllDurations(Iterable<? extends Duration> values)
public ShipmentModel.DurationDistanceMatrix.Row.Builder addAllDurations(Iterable<? extends Duration> values)
Duration values for a given row. It must have as many elements as
ShipmentModel.duration_distance_matrix_dst_tags.
repeated .google.protobuf.Duration durations = 1;
Parameter
Name | Description |
values | Iterable<? extends com.google.protobuf.Duration>
|
Returns
addAllMeters(Iterable<? extends Double> values)
public ShipmentModel.DurationDistanceMatrix.Row.Builder addAllMeters(Iterable<? extends Double> values)
Distance values for a given row. If no costs or constraints refer to
distances in the model, this can be left empty; otherwise it must have
as many elements as durations
.
repeated double meters = 2;
Parameter
Name | Description |
values | Iterable<? extends java.lang.Double>
The meters to add.
|
Returns
addDurations(Duration value)
public ShipmentModel.DurationDistanceMatrix.Row.Builder addDurations(Duration value)
Duration values for a given row. It must have as many elements as
ShipmentModel.duration_distance_matrix_dst_tags.
repeated .google.protobuf.Duration durations = 1;
Parameter
Returns
addDurations(Duration.Builder builderForValue)
public ShipmentModel.DurationDistanceMatrix.Row.Builder addDurations(Duration.Builder builderForValue)
Duration values for a given row. It must have as many elements as
ShipmentModel.duration_distance_matrix_dst_tags.
repeated .google.protobuf.Duration durations = 1;
Parameter
Name | Description |
builderForValue | Builder
|
Returns
addDurations(int index, Duration value)
public ShipmentModel.DurationDistanceMatrix.Row.Builder addDurations(int index, Duration value)
Duration values for a given row. It must have as many elements as
ShipmentModel.duration_distance_matrix_dst_tags.
repeated .google.protobuf.Duration durations = 1;
Parameters
Returns
addDurations(int index, Duration.Builder builderForValue)
public ShipmentModel.DurationDistanceMatrix.Row.Builder addDurations(int index, Duration.Builder builderForValue)
Duration values for a given row. It must have as many elements as
ShipmentModel.duration_distance_matrix_dst_tags.
repeated .google.protobuf.Duration durations = 1;
Parameters
Returns
addDurationsBuilder()
public Duration.Builder addDurationsBuilder()
Duration values for a given row. It must have as many elements as
ShipmentModel.duration_distance_matrix_dst_tags.
repeated .google.protobuf.Duration durations = 1;
Returns
addDurationsBuilder(int index)
public Duration.Builder addDurationsBuilder(int index)
Duration values for a given row. It must have as many elements as
ShipmentModel.duration_distance_matrix_dst_tags.
repeated .google.protobuf.Duration durations = 1;
Parameter
Returns
addMeters(double value)
public ShipmentModel.DurationDistanceMatrix.Row.Builder addMeters(double value)
Distance values for a given row. If no costs or constraints refer to
distances in the model, this can be left empty; otherwise it must have
as many elements as durations
.
repeated double meters = 2;
Parameter
Name | Description |
value | double
The meters to add.
|
Returns
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public ShipmentModel.DurationDistanceMatrix.Row.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public ShipmentModel.DurationDistanceMatrix.Row build()
Returns
buildPartial()
public ShipmentModel.DurationDistanceMatrix.Row buildPartial()
Returns
clear()
public ShipmentModel.DurationDistanceMatrix.Row.Builder clear()
Returns
Overrides
clearDurations()
public ShipmentModel.DurationDistanceMatrix.Row.Builder clearDurations()
Duration values for a given row. It must have as many elements as
ShipmentModel.duration_distance_matrix_dst_tags.
repeated .google.protobuf.Duration durations = 1;
Returns
clearField(Descriptors.FieldDescriptor field)
public ShipmentModel.DurationDistanceMatrix.Row.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearMeters()
public ShipmentModel.DurationDistanceMatrix.Row.Builder clearMeters()
Distance values for a given row. If no costs or constraints refer to
distances in the model, this can be left empty; otherwise it must have
as many elements as durations
.
repeated double meters = 2;
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public ShipmentModel.DurationDistanceMatrix.Row.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clone()
public ShipmentModel.DurationDistanceMatrix.Row.Builder clone()
Returns
Overrides
getDefaultInstanceForType()
public ShipmentModel.DurationDistanceMatrix.Row getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getDurations(int index)
public Duration getDurations(int index)
Duration values for a given row. It must have as many elements as
ShipmentModel.duration_distance_matrix_dst_tags.
repeated .google.protobuf.Duration durations = 1;
Parameter
Returns
getDurationsBuilder(int index)
public Duration.Builder getDurationsBuilder(int index)
Duration values for a given row. It must have as many elements as
ShipmentModel.duration_distance_matrix_dst_tags.
repeated .google.protobuf.Duration durations = 1;
Parameter
Returns
getDurationsBuilderList()
public List<Duration.Builder> getDurationsBuilderList()
Duration values for a given row. It must have as many elements as
ShipmentModel.duration_distance_matrix_dst_tags.
repeated .google.protobuf.Duration durations = 1;
Returns
getDurationsCount()
public int getDurationsCount()
Duration values for a given row. It must have as many elements as
ShipmentModel.duration_distance_matrix_dst_tags.
repeated .google.protobuf.Duration durations = 1;
Returns
getDurationsList()
public List<Duration> getDurationsList()
Duration values for a given row. It must have as many elements as
ShipmentModel.duration_distance_matrix_dst_tags.
repeated .google.protobuf.Duration durations = 1;
Returns
getDurationsOrBuilder(int index)
public DurationOrBuilder getDurationsOrBuilder(int index)
Duration values for a given row. It must have as many elements as
ShipmentModel.duration_distance_matrix_dst_tags.
repeated .google.protobuf.Duration durations = 1;
Parameter
Returns
getDurationsOrBuilderList()
public List<? extends DurationOrBuilder> getDurationsOrBuilderList()
Duration values for a given row. It must have as many elements as
ShipmentModel.duration_distance_matrix_dst_tags.
repeated .google.protobuf.Duration durations = 1;
Returns
Type | Description |
List<? extends com.google.protobuf.DurationOrBuilder> | |
getMeters(int index)
public double getMeters(int index)
Distance values for a given row. If no costs or constraints refer to
distances in the model, this can be left empty; otherwise it must have
as many elements as durations
.
repeated double meters = 2;
Parameter
Name | Description |
index | int
The index of the element to return.
|
Returns
Type | Description |
double | The meters at the given index.
|
getMetersCount()
public int getMetersCount()
Distance values for a given row. If no costs or constraints refer to
distances in the model, this can be left empty; otherwise it must have
as many elements as durations
.
repeated double meters = 2;
Returns
Type | Description |
int | The count of meters.
|
getMetersList()
public List<Double> getMetersList()
Distance values for a given row. If no costs or constraints refer to
distances in the model, this can be left empty; otherwise it must have
as many elements as durations
.
repeated double meters = 2;
Returns
Type | Description |
List<Double> | A list containing the meters.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(ShipmentModel.DurationDistanceMatrix.Row other)
public ShipmentModel.DurationDistanceMatrix.Row.Builder mergeFrom(ShipmentModel.DurationDistanceMatrix.Row other)
Parameter
Returns
public ShipmentModel.DurationDistanceMatrix.Row.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public ShipmentModel.DurationDistanceMatrix.Row.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final ShipmentModel.DurationDistanceMatrix.Row.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
removeDurations(int index)
public ShipmentModel.DurationDistanceMatrix.Row.Builder removeDurations(int index)
Duration values for a given row. It must have as many elements as
ShipmentModel.duration_distance_matrix_dst_tags.
repeated .google.protobuf.Duration durations = 1;
Parameter
Returns
setDurations(int index, Duration value)
public ShipmentModel.DurationDistanceMatrix.Row.Builder setDurations(int index, Duration value)
Duration values for a given row. It must have as many elements as
ShipmentModel.duration_distance_matrix_dst_tags.
repeated .google.protobuf.Duration durations = 1;
Parameters
Returns
setDurations(int index, Duration.Builder builderForValue)
public ShipmentModel.DurationDistanceMatrix.Row.Builder setDurations(int index, Duration.Builder builderForValue)
Duration values for a given row. It must have as many elements as
ShipmentModel.duration_distance_matrix_dst_tags.
repeated .google.protobuf.Duration durations = 1;
Parameters
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public ShipmentModel.DurationDistanceMatrix.Row.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setMeters(int index, double value)
public ShipmentModel.DurationDistanceMatrix.Row.Builder setMeters(int index, double value)
Distance values for a given row. If no costs or constraints refer to
distances in the model, this can be left empty; otherwise it must have
as many elements as durations
.
repeated double meters = 2;
Parameters
Name | Description |
index | int
The index to set the value at.
|
value | double
The meters to set.
|
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public ShipmentModel.DurationDistanceMatrix.Row.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final ShipmentModel.DurationDistanceMatrix.Row.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides