Class NoOverlap2DConstraintProto.Builder

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

public static final class NoOverlap2DConstraintProto.Builder extends com.google.protobuf.GeneratedMessage.Builder<NoOverlap2DConstraintProto.Builder> implements NoOverlap2DConstraintProtoOrBuilder
 The boxes defined by [start_x, end_x) * [start_y, end_y) cannot overlap.
 Furthermore, one box is optional if at least one of the x or y interval is
 optional.

 Note that the case of boxes of size zero is special. The following cases
 violate the constraint:
 - a point box inside a box with a non zero area
 - a line box overlapping a box with a non zero area
 - one vertical line box crossing an horizontal line box.
 
Protobuf type operations_research.sat.NoOverlap2DConstraintProto
  • 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<NoOverlap2DConstraintProto.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<NoOverlap2DConstraintProto.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<NoOverlap2DConstraintProto.Builder>
    • getDefaultInstanceForType

      public NoOverlap2DConstraintProto 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 NoOverlap2DConstraintProto buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

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

      public NoOverlap2DConstraintProto.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<NoOverlap2DConstraintProto.Builder>
      Throws:
      IOException
    • getXIntervalsList

      public List<Integer> getXIntervalsList()
      repeated int32 x_intervals = 1;
      Specified by:
      getXIntervalsList in interface NoOverlap2DConstraintProtoOrBuilder
      Returns:
      A list containing the xIntervals.
    • getXIntervalsCount

      public int getXIntervalsCount()
      repeated int32 x_intervals = 1;
      Specified by:
      getXIntervalsCount in interface NoOverlap2DConstraintProtoOrBuilder
      Returns:
      The count of xIntervals.
    • getXIntervals

      public int getXIntervals(int index)
      repeated int32 x_intervals = 1;
      Specified by:
      getXIntervals in interface NoOverlap2DConstraintProtoOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The xIntervals at the given index.
    • setXIntervals

      public NoOverlap2DConstraintProto.Builder setXIntervals(int index, int value)
      repeated int32 x_intervals = 1;
      Parameters:
      index - The index to set the value at.
      value - The xIntervals to set.
      Returns:
      This builder for chaining.
    • addXIntervals

      public NoOverlap2DConstraintProto.Builder addXIntervals(int value)
      repeated int32 x_intervals = 1;
      Parameters:
      value - The xIntervals to add.
      Returns:
      This builder for chaining.
    • addAllXIntervals

      public NoOverlap2DConstraintProto.Builder addAllXIntervals(Iterable<? extends Integer> values)
      repeated int32 x_intervals = 1;
      Parameters:
      values - The xIntervals to add.
      Returns:
      This builder for chaining.
    • clearXIntervals

      public NoOverlap2DConstraintProto.Builder clearXIntervals()
      repeated int32 x_intervals = 1;
      Returns:
      This builder for chaining.
    • getYIntervalsList

      public List<Integer> getYIntervalsList()
       Same size as x_intervals.
       
      repeated int32 y_intervals = 2;
      Specified by:
      getYIntervalsList in interface NoOverlap2DConstraintProtoOrBuilder
      Returns:
      A list containing the yIntervals.
    • getYIntervalsCount

      public int getYIntervalsCount()
       Same size as x_intervals.
       
      repeated int32 y_intervals = 2;
      Specified by:
      getYIntervalsCount in interface NoOverlap2DConstraintProtoOrBuilder
      Returns:
      The count of yIntervals.
    • getYIntervals

      public int getYIntervals(int index)
       Same size as x_intervals.
       
      repeated int32 y_intervals = 2;
      Specified by:
      getYIntervals in interface NoOverlap2DConstraintProtoOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The yIntervals at the given index.
    • setYIntervals

      public NoOverlap2DConstraintProto.Builder setYIntervals(int index, int value)
       Same size as x_intervals.
       
      repeated int32 y_intervals = 2;
      Parameters:
      index - The index to set the value at.
      value - The yIntervals to set.
      Returns:
      This builder for chaining.
    • addYIntervals

      public NoOverlap2DConstraintProto.Builder addYIntervals(int value)
       Same size as x_intervals.
       
      repeated int32 y_intervals = 2;
      Parameters:
      value - The yIntervals to add.
      Returns:
      This builder for chaining.
    • addAllYIntervals

      public NoOverlap2DConstraintProto.Builder addAllYIntervals(Iterable<? extends Integer> values)
       Same size as x_intervals.
       
      repeated int32 y_intervals = 2;
      Parameters:
      values - The yIntervals to add.
      Returns:
      This builder for chaining.
    • clearYIntervals

      public NoOverlap2DConstraintProto.Builder clearYIntervals()
       Same size as x_intervals.
       
      repeated int32 y_intervals = 2;
      Returns:
      This builder for chaining.