Package com.google.ortools.linearsolver
Class MPArrayWithConstantConstraint.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<MPArrayWithConstantConstraint.Builder>
-
- com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder
-
- All Implemented Interfaces:
MPArrayWithConstantConstraintOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,java.lang.Cloneable
- Enclosing class:
- MPArrayWithConstantConstraint
public static final class MPArrayWithConstantConstraint.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<MPArrayWithConstantConstraint.Builder> implements MPArrayWithConstantConstraintOrBuilder
Sets a variable's value equal to a function on a set of variables and, optionally, a constant.
Protobuf typeoperations_research.MPArrayWithConstantConstraint
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MPArrayWithConstantConstraint.BuilderaddAllVarIndex(java.lang.Iterable<? extends java.lang.Integer> values)Variable indices are relative to the "variable" field in MPModelProto.MPArrayWithConstantConstraint.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)MPArrayWithConstantConstraint.BuilderaddVarIndex(int value)Variable indices are relative to the "variable" field in MPModelProto.MPArrayWithConstantConstraintbuild()MPArrayWithConstantConstraintbuildPartial()MPArrayWithConstantConstraint.Builderclear()MPArrayWithConstantConstraint.BuilderclearConstant()optional double constant = 2;MPArrayWithConstantConstraint.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)MPArrayWithConstantConstraint.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)MPArrayWithConstantConstraint.BuilderclearResultantVarIndex()optional int32 resultant_var_index = 3;MPArrayWithConstantConstraint.BuilderclearVarIndex()Variable indices are relative to the "variable" field in MPModelProto.MPArrayWithConstantConstraint.Builderclone()doublegetConstant()optional double constant = 2;MPArrayWithConstantConstraintgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()intgetResultantVarIndex()optional int32 resultant_var_index = 3;intgetVarIndex(int index)Variable indices are relative to the "variable" field in MPModelProto.intgetVarIndexCount()Variable indices are relative to the "variable" field in MPModelProto.java.util.List<java.lang.Integer>getVarIndexList()Variable indices are relative to the "variable" field in MPModelProto.booleanhasConstant()optional double constant = 2;booleanhasResultantVarIndex()optional int32 resultant_var_index = 3;protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()MPArrayWithConstantConstraint.BuildermergeFrom(MPArrayWithConstantConstraint other)MPArrayWithConstantConstraint.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)MPArrayWithConstantConstraint.BuildermergeFrom(com.google.protobuf.Message other)MPArrayWithConstantConstraint.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)MPArrayWithConstantConstraint.BuildersetConstant(double value)optional double constant = 2;MPArrayWithConstantConstraint.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)MPArrayWithConstantConstraint.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)MPArrayWithConstantConstraint.BuildersetResultantVarIndex(int value)optional int32 resultant_var_index = 3;MPArrayWithConstantConstraint.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)MPArrayWithConstantConstraint.BuildersetVarIndex(int index, int value)Variable indices are relative to the "variable" field in MPModelProto.-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<MPArrayWithConstantConstraint.Builder>
-
clear
public MPArrayWithConstantConstraint.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<MPArrayWithConstantConstraint.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<MPArrayWithConstantConstraint.Builder>
-
getDefaultInstanceForType
public MPArrayWithConstantConstraint getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public MPArrayWithConstantConstraint build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public MPArrayWithConstantConstraint buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public MPArrayWithConstantConstraint.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<MPArrayWithConstantConstraint.Builder>
-
setField
public MPArrayWithConstantConstraint.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<MPArrayWithConstantConstraint.Builder>
-
clearField
public MPArrayWithConstantConstraint.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<MPArrayWithConstantConstraint.Builder>
-
clearOneof
public MPArrayWithConstantConstraint.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<MPArrayWithConstantConstraint.Builder>
-
setRepeatedField
public MPArrayWithConstantConstraint.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<MPArrayWithConstantConstraint.Builder>
-
addRepeatedField
public MPArrayWithConstantConstraint.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<MPArrayWithConstantConstraint.Builder>
-
mergeFrom
public MPArrayWithConstantConstraint.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<MPArrayWithConstantConstraint.Builder>
-
mergeFrom
public MPArrayWithConstantConstraint.Builder mergeFrom(MPArrayWithConstantConstraint other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<MPArrayWithConstantConstraint.Builder>
-
mergeFrom
public MPArrayWithConstantConstraint.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<MPArrayWithConstantConstraint.Builder>- Throws:
java.io.IOException
-
getVarIndexList
public java.util.List<java.lang.Integer> getVarIndexList()
Variable indices are relative to the "variable" field in MPModelProto. resultant_var = f(var_1, var_2, ..., constant)
repeated int32 var_index = 1;- Specified by:
getVarIndexListin interfaceMPArrayWithConstantConstraintOrBuilder- Returns:
- A list containing the varIndex.
-
getVarIndexCount
public int getVarIndexCount()
Variable indices are relative to the "variable" field in MPModelProto. resultant_var = f(var_1, var_2, ..., constant)
repeated int32 var_index = 1;- Specified by:
getVarIndexCountin interfaceMPArrayWithConstantConstraintOrBuilder- Returns:
- The count of varIndex.
-
getVarIndex
public int getVarIndex(int index)
Variable indices are relative to the "variable" field in MPModelProto. resultant_var = f(var_1, var_2, ..., constant)
repeated int32 var_index = 1;- Specified by:
getVarIndexin interfaceMPArrayWithConstantConstraintOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The varIndex at the given index.
-
setVarIndex
public MPArrayWithConstantConstraint.Builder setVarIndex(int index, int value)
Variable indices are relative to the "variable" field in MPModelProto. resultant_var = f(var_1, var_2, ..., constant)
repeated int32 var_index = 1;- Parameters:
index- The index to set the value at.value- The varIndex to set.- Returns:
- This builder for chaining.
-
addVarIndex
public MPArrayWithConstantConstraint.Builder addVarIndex(int value)
Variable indices are relative to the "variable" field in MPModelProto. resultant_var = f(var_1, var_2, ..., constant)
repeated int32 var_index = 1;- Parameters:
value- The varIndex to add.- Returns:
- This builder for chaining.
-
addAllVarIndex
public MPArrayWithConstantConstraint.Builder addAllVarIndex(java.lang.Iterable<? extends java.lang.Integer> values)
Variable indices are relative to the "variable" field in MPModelProto. resultant_var = f(var_1, var_2, ..., constant)
repeated int32 var_index = 1;- Parameters:
values- The varIndex to add.- Returns:
- This builder for chaining.
-
clearVarIndex
public MPArrayWithConstantConstraint.Builder clearVarIndex()
Variable indices are relative to the "variable" field in MPModelProto. resultant_var = f(var_1, var_2, ..., constant)
repeated int32 var_index = 1;- Returns:
- This builder for chaining.
-
hasConstant
public boolean hasConstant()
optional double constant = 2;- Specified by:
hasConstantin interfaceMPArrayWithConstantConstraintOrBuilder- Returns:
- Whether the constant field is set.
-
getConstant
public double getConstant()
optional double constant = 2;- Specified by:
getConstantin interfaceMPArrayWithConstantConstraintOrBuilder- Returns:
- The constant.
-
setConstant
public MPArrayWithConstantConstraint.Builder setConstant(double value)
optional double constant = 2;- Parameters:
value- The constant to set.- Returns:
- This builder for chaining.
-
clearConstant
public MPArrayWithConstantConstraint.Builder clearConstant()
optional double constant = 2;- Returns:
- This builder for chaining.
-
hasResultantVarIndex
public boolean hasResultantVarIndex()
optional int32 resultant_var_index = 3;- Specified by:
hasResultantVarIndexin interfaceMPArrayWithConstantConstraintOrBuilder- Returns:
- Whether the resultantVarIndex field is set.
-
getResultantVarIndex
public int getResultantVarIndex()
optional int32 resultant_var_index = 3;- Specified by:
getResultantVarIndexin interfaceMPArrayWithConstantConstraintOrBuilder- Returns:
- The resultantVarIndex.
-
setResultantVarIndex
public MPArrayWithConstantConstraint.Builder setResultantVarIndex(int value)
optional int32 resultant_var_index = 3;- Parameters:
value- The resultantVarIndex to set.- Returns:
- This builder for chaining.
-
clearResultantVarIndex
public MPArrayWithConstantConstraint.Builder clearResultantVarIndex()
optional int32 resultant_var_index = 3;- Returns:
- This builder for chaining.
-
setUnknownFields
public final MPArrayWithConstantConstraint.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<MPArrayWithConstantConstraint.Builder>
-
mergeUnknownFields
public final MPArrayWithConstantConstraint.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<MPArrayWithConstantConstraint.Builder>
-
-