Class ShipmentModel.DurationDistanceMatrix.Row.Builder (1.3.0)

publicstaticfinalclass ShipmentModel.DurationDistanceMatrix.Row.BuilderextendsGeneratedMessageV3.Builder<ShipmentModel.DurationDistanceMatrix.Row.Builder>implementsShipmentModel.DurationDistanceMatrix.RowOrBuilder

Specifies a row of the duration and distance matrix.

Protobuf type google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description

Methods

addAllDurations(Iterable<? extends Duration> values)

publicShipmentModel.DurationDistanceMatrix.Row.BuilderaddAllDurations(Iterable<?extendsDuration>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
Type Description

addAllMeters(Iterable<? extends Double> values)

publicShipmentModel.DurationDistanceMatrix.Row.BuilderaddAllMeters(Iterable<?extendsDouble>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
Type Description

addDurations(Duration value)

publicShipmentModel.DurationDistanceMatrix.Row.BuilderaddDurations(Durationvalue)

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
value Duration
Returns
Type Description

addDurations(Duration.Builder builderForValue)

publicShipmentModel.DurationDistanceMatrix.Row.BuilderaddDurations(Duration.BuilderbuilderForValue)

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
Type Description

addDurations(int index, Duration value)

publicShipmentModel.DurationDistanceMatrix.Row.BuilderaddDurations(intindex,Durationvalue)

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
Name Description
index int
value Duration
Returns
Type Description

addDurations(int index, Duration.Builder builderForValue)

publicShipmentModel.DurationDistanceMatrix.Row.BuilderaddDurations(intindex,Duration.BuilderbuilderForValue)

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
Name Description
index int
builderForValue Builder
Returns
Type Description

addDurationsBuilder()

publicDuration.BuilderaddDurationsBuilder()

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

addDurationsBuilder(int index)

publicDuration.BuilderaddDurationsBuilder(intindex)

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
index int
Returns
Type Description

addMeters(double value)

publicShipmentModel.DurationDistanceMatrix.Row.BuilderaddMeters(doublevalue)

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
Type Description

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicShipmentModel.DurationDistanceMatrix.Row.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
value Object
Returns
Type Description
Overrides

build()

publicShipmentModel.DurationDistanceMatrix.Rowbuild()
Returns
Type Description

buildPartial()

publicShipmentModel.DurationDistanceMatrix.RowbuildPartial()
Returns
Type Description

clear()

publicShipmentModel.DurationDistanceMatrix.Row.Builderclear()
Returns
Type Description
Overrides

clearDurations()

publicShipmentModel.DurationDistanceMatrix.Row.BuilderclearDurations()

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

clearField(Descriptors.FieldDescriptor field)

publicShipmentModel.DurationDistanceMatrix.Row.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
Returns
Type Description
Overrides

clearMeters()

publicShipmentModel.DurationDistanceMatrix.Row.BuilderclearMeters()

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

clearOneof(Descriptors.OneofDescriptor oneof)

publicShipmentModel.DurationDistanceMatrix.Row.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
Returns
Type Description
Overrides

clone()

publicShipmentModel.DurationDistanceMatrix.Row.Builderclone()
Returns
Type Description
Overrides

getDefaultInstanceForType()

publicShipmentModel.DurationDistanceMatrix.RowgetDefaultInstanceForType()
Returns
Type Description

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Overrides

getDurations(int index)

publicDurationgetDurations(intindex)

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
index int
Returns
Type Description

getDurationsBuilder(int index)

publicDuration.BuildergetDurationsBuilder(intindex)

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
index int
Returns
Type Description

getDurationsBuilderList()

publicList<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
Type Description

getDurationsCount()

publicintgetDurationsCount()

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
int

getDurationsList()

publicList<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
Type Description

getDurationsOrBuilder(int index)

publicDurationOrBuildergetDurationsOrBuilder(intindex)

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
index int
Returns
Type Description

getDurationsOrBuilderList()

publicList<?extendsDurationOrBuilder>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)

publicdoublegetMeters(intindex)

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()

publicintgetMetersCount()

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()

publicList<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()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
Overrides

mergeFrom(ShipmentModel.DurationDistanceMatrix.Row other)

publicShipmentModel.DurationDistanceMatrix.Row.BuildermergeFrom(ShipmentModel.DurationDistanceMatrix.Rowother)
Parameter
Name Description
Returns
Type Description

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicShipmentModel.DurationDistanceMatrix.Row.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Overrides Exceptions
Type Description

mergeFrom(Message other)

publicShipmentModel.DurationDistanceMatrix.Row.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalShipmentModel.DurationDistanceMatrix.Row.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Overrides

removeDurations(int index)

publicShipmentModel.DurationDistanceMatrix.Row.BuilderremoveDurations(intindex)

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
index int
Returns
Type Description

setDurations(int index, Duration value)

publicShipmentModel.DurationDistanceMatrix.Row.BuildersetDurations(intindex,Durationvalue)

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
Name Description
index int
value Duration
Returns
Type Description

setDurations(int index, Duration.Builder builderForValue)

publicShipmentModel.DurationDistanceMatrix.Row.BuildersetDurations(intindex,Duration.BuilderbuilderForValue)

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
Name Description
index int
builderForValue Builder
Returns
Type Description

setField(Descriptors.FieldDescriptor field, Object value)

publicShipmentModel.DurationDistanceMatrix.Row.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
value Object
Returns
Type Description
Overrides

setMeters(int index, double value)

publicShipmentModel.DurationDistanceMatrix.Row.BuildersetMeters(intindex,doublevalue)

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
Type Description

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

publicShipmentModel.DurationDistanceMatrix.Row.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
index int
value Object
Returns
Type Description
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalShipmentModel.DurationDistanceMatrix.Row.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Overrides

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.