Class NoOverlap2DConstraintProto.Builder

  • All Implemented Interfaces:
    NoOverlap2DConstraintProtoOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.lang.Cloneable
    Enclosing class:
    NoOverlap2DConstraintProto

    public static final class NoOverlap2DConstraintProto.Builder
    extends com.google.protobuf.GeneratedMessageV3.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 Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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

        public NoOverlap2DConstraintProto 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
      • setRepeatedField

        public NoOverlap2DConstraintProto.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                                   int index,
                                                                   java.lang.Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<NoOverlap2DConstraintProto.Builder>
      • addRepeatedField

        public NoOverlap2DConstraintProto.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                                   java.lang.Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<NoOverlap2DConstraintProto.Builder>
      • isInitialized

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

        public NoOverlap2DConstraintProto.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                     throws java.io.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:
        java.io.IOException
      • 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​(java.lang.Iterable<? extends java.lang.Integer> values)
        repeated int32 x_intervals = 1;
        Parameters:
        values - The xIntervals to add.
        Returns:
        This builder for chaining.
      • getYIntervalsList

        public java.util.List<java.lang.Integer> getYIntervalsList()
         Same size as x_intervals.
         
        repeated int32 y_intervals = 2;
        Specified by:
        getYIntervalsList in interface NoOverlap2DConstraintProtoOrBuilder
        Returns:
        A list containing the 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​(java.lang.Iterable<? extends java.lang.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.
      • setUnknownFields

        public final NoOverlap2DConstraintProto.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<NoOverlap2DConstraintProto.Builder>
      • mergeUnknownFields

        public final NoOverlap2DConstraintProto.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<NoOverlap2DConstraintProto.Builder>