Class TableConstraintProto.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<TableConstraintProto.Builder>
com.google.protobuf.GeneratedMessage.Builder<TableConstraintProto.Builder>
com.google.ortools.sat.TableConstraintProto.Builder
All Implemented Interfaces:
TableConstraintProtoOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
TableConstraintProto

public static final class TableConstraintProto.Builder extends com.google.protobuf.GeneratedMessage.Builder<TableConstraintProto.Builder> implements TableConstraintProtoOrBuilder
 The values of the n-tuple formed by the given expression can only be one of
 the listed n-tuples in values. The n-tuples are encoded in a flattened way:
 [tuple0_v0, tuple0_v1, ..., tuple0_v{n-1}, tuple1_v0, ...].
 Expressions must be affine (a * var + b).
 Corner cases:
 - If all `vars`, `values` and `exprs` are empty, the constraint is trivially
 true, irrespective of the value of `negated`.
 - If `values` is empty but either vars or exprs is not, the constraint is
 trivially false if `negated` is false, and trivially true if `negated` is
 true.
 - If `vars` and `exprs` are empty but `values` is not, the model is invalid.
 
Protobuf type operations_research.sat.TableConstraintProto
  • 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<TableConstraintProto.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<TableConstraintProto.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<TableConstraintProto.Builder>
    • getDefaultInstanceForType

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

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

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

      public TableConstraintProto.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<TableConstraintProto.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<TableConstraintProto.Builder>
    • mergeFrom

      public TableConstraintProto.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<TableConstraintProto.Builder>
      Throws:
      IOException
    • getVarsList

      public List<Integer> getVarsList()
       Legacy field.
       
      repeated int32 vars = 1;
      Specified by:
      getVarsList in interface TableConstraintProtoOrBuilder
      Returns:
      A list containing the vars.
    • getVarsCount

      public int getVarsCount()
       Legacy field.
       
      repeated int32 vars = 1;
      Specified by:
      getVarsCount in interface TableConstraintProtoOrBuilder
      Returns:
      The count of vars.
    • getVars

      public int getVars(int index)
       Legacy field.
       
      repeated int32 vars = 1;
      Specified by:
      getVars in interface TableConstraintProtoOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The vars at the given index.
    • setVars

      public TableConstraintProto.Builder setVars(int index, int value)
       Legacy field.
       
      repeated int32 vars = 1;
      Parameters:
      index - The index to set the value at.
      value - The vars to set.
      Returns:
      This builder for chaining.
    • addVars

      public TableConstraintProto.Builder addVars(int value)
       Legacy field.
       
      repeated int32 vars = 1;
      Parameters:
      value - The vars to add.
      Returns:
      This builder for chaining.
    • addAllVars

      public TableConstraintProto.Builder addAllVars(Iterable<? extends Integer> values)
       Legacy field.
       
      repeated int32 vars = 1;
      Parameters:
      values - The vars to add.
      Returns:
      This builder for chaining.
    • clearVars

      public TableConstraintProto.Builder clearVars()
       Legacy field.
       
      repeated int32 vars = 1;
      Returns:
      This builder for chaining.
    • getValuesList

      public List<Long> getValuesList()
      repeated int64 values = 2;
      Specified by:
      getValuesList in interface TableConstraintProtoOrBuilder
      Returns:
      A list containing the values.
    • getValuesCount

      public int getValuesCount()
      repeated int64 values = 2;
      Specified by:
      getValuesCount in interface TableConstraintProtoOrBuilder
      Returns:
      The count of values.
    • getValues

      public long getValues(int index)
      repeated int64 values = 2;
      Specified by:
      getValues in interface TableConstraintProtoOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The values at the given index.
    • setValues

      public TableConstraintProto.Builder setValues(int index, long value)
      repeated int64 values = 2;
      Parameters:
      index - The index to set the value at.
      value - The values to set.
      Returns:
      This builder for chaining.
    • addValues

      public TableConstraintProto.Builder addValues(long value)
      repeated int64 values = 2;
      Parameters:
      value - The values to add.
      Returns:
      This builder for chaining.
    • addAllValues

      public TableConstraintProto.Builder addAllValues(Iterable<? extends Long> values)
      repeated int64 values = 2;
      Parameters:
      values - The values to add.
      Returns:
      This builder for chaining.
    • clearValues

      public TableConstraintProto.Builder clearValues()
      repeated int64 values = 2;
      Returns:
      This builder for chaining.
    • getExprsList

      public List<LinearExpressionProto> getExprsList()
      repeated .operations_research.sat.LinearExpressionProto exprs = 4;
      Specified by:
      getExprsList in interface TableConstraintProtoOrBuilder
    • getExprsCount

      public int getExprsCount()
      repeated .operations_research.sat.LinearExpressionProto exprs = 4;
      Specified by:
      getExprsCount in interface TableConstraintProtoOrBuilder
    • getExprs

      public LinearExpressionProto getExprs(int index)
      repeated .operations_research.sat.LinearExpressionProto exprs = 4;
      Specified by:
      getExprs in interface TableConstraintProtoOrBuilder
    • setExprs

      public TableConstraintProto.Builder setExprs(int index, LinearExpressionProto value)
      repeated .operations_research.sat.LinearExpressionProto exprs = 4;
    • setExprs

      public TableConstraintProto.Builder setExprs(int index, LinearExpressionProto.Builder builderForValue)
      repeated .operations_research.sat.LinearExpressionProto exprs = 4;
    • addExprs

      repeated .operations_research.sat.LinearExpressionProto exprs = 4;
    • addExprs

      public TableConstraintProto.Builder addExprs(int index, LinearExpressionProto value)
      repeated .operations_research.sat.LinearExpressionProto exprs = 4;
    • addExprs

      repeated .operations_research.sat.LinearExpressionProto exprs = 4;
    • addExprs

      public TableConstraintProto.Builder addExprs(int index, LinearExpressionProto.Builder builderForValue)
      repeated .operations_research.sat.LinearExpressionProto exprs = 4;
    • addAllExprs

      public TableConstraintProto.Builder addAllExprs(Iterable<? extends LinearExpressionProto> values)
      repeated .operations_research.sat.LinearExpressionProto exprs = 4;
    • clearExprs

      public TableConstraintProto.Builder clearExprs()
      repeated .operations_research.sat.LinearExpressionProto exprs = 4;
    • removeExprs

      public TableConstraintProto.Builder removeExprs(int index)
      repeated .operations_research.sat.LinearExpressionProto exprs = 4;
    • getExprsBuilder

      public LinearExpressionProto.Builder getExprsBuilder(int index)
      repeated .operations_research.sat.LinearExpressionProto exprs = 4;
    • getExprsOrBuilder

      public LinearExpressionProtoOrBuilder getExprsOrBuilder(int index)
      repeated .operations_research.sat.LinearExpressionProto exprs = 4;
      Specified by:
      getExprsOrBuilder in interface TableConstraintProtoOrBuilder
    • getExprsOrBuilderList

      public List<? extends LinearExpressionProtoOrBuilder> getExprsOrBuilderList()
      repeated .operations_research.sat.LinearExpressionProto exprs = 4;
      Specified by:
      getExprsOrBuilderList in interface TableConstraintProtoOrBuilder
    • addExprsBuilder

      public LinearExpressionProto.Builder addExprsBuilder()
      repeated .operations_research.sat.LinearExpressionProto exprs = 4;
    • addExprsBuilder

      public LinearExpressionProto.Builder addExprsBuilder(int index)
      repeated .operations_research.sat.LinearExpressionProto exprs = 4;
    • getExprsBuilderList

      public List<LinearExpressionProto.Builder> getExprsBuilderList()
      repeated .operations_research.sat.LinearExpressionProto exprs = 4;
    • getNegated

      public boolean getNegated()
       If true, the meaning is "negated", that is we forbid any of the given
       tuple from a feasible assignment.
       
      bool negated = 3;
      Specified by:
      getNegated in interface TableConstraintProtoOrBuilder
      Returns:
      The negated.
    • setNegated

      public TableConstraintProto.Builder setNegated(boolean value)
       If true, the meaning is "negated", that is we forbid any of the given
       tuple from a feasible assignment.
       
      bool negated = 3;
      Parameters:
      value - The negated to set.
      Returns:
      This builder for chaining.
    • clearNegated

      public TableConstraintProto.Builder clearNegated()
       If true, the meaning is "negated", that is we forbid any of the given
       tuple from a feasible assignment.
       
      bool negated = 3;
      Returns:
      This builder for chaining.