Class MPArrayWithConstantConstraint.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<MPArrayWithConstantConstraint.Builder>
com.google.protobuf.GeneratedMessage.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, Cloneable
Enclosing class:
MPArrayWithConstantConstraint

public static final class MPArrayWithConstantConstraint.Builder extends com.google.protobuf.GeneratedMessage.Builder<MPArrayWithConstantConstraint.Builder> implements MPArrayWithConstantConstraintOrBuilder
 Sets a variable's value equal to a function on a set of variables and,
 optionally, a constant.
 
Protobuf type operations_research.MPArrayWithConstantConstraint
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<MPArrayWithConstantConstraint.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<MPArrayWithConstantConstraint.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<MPArrayWithConstantConstraint.Builder>
    • getDefaultInstanceForType

      public MPArrayWithConstantConstraint getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public MPArrayWithConstantConstraint buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public MPArrayWithConstantConstraint.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<MPArrayWithConstantConstraint.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<MPArrayWithConstantConstraint.Builder>
    • mergeFrom

      public MPArrayWithConstantConstraint.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<MPArrayWithConstantConstraint.Builder>
      Throws:
      IOException
    • getVarIndexList

      public List<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:
      getVarIndexList in interface MPArrayWithConstantConstraintOrBuilder
      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:
      getVarIndexCount in interface MPArrayWithConstantConstraintOrBuilder
      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:
      getVarIndex in interface MPArrayWithConstantConstraintOrBuilder
      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(Iterable<? extends 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:
      hasConstant in interface MPArrayWithConstantConstraintOrBuilder
      Returns:
      Whether the constant field is set.
    • getConstant

      public double getConstant()
      optional double constant = 2;
      Specified by:
      getConstant in interface MPArrayWithConstantConstraintOrBuilder
      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:
      hasResultantVarIndex in interface MPArrayWithConstantConstraintOrBuilder
      Returns:
      Whether the resultantVarIndex field is set.
    • getResultantVarIndex

      public int getResultantVarIndex()
      optional int32 resultant_var_index = 3;
      Specified by:
      getResultantVarIndex in interface MPArrayWithConstantConstraintOrBuilder
      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.