com.google.ortools.sat.NoOverlap2DConstraintProto Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: ortools/sat/cp_model.proto
package com.google.ortools.sat;
/**
*
* The boxes defined by [start_x, end_x) * [start_y, end_y) cannot overlap.
*
*
* Protobuf type {@code operations_research.sat.NoOverlap2DConstraintProto}
*/
public final class NoOverlap2DConstraintProto extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:operations_research.sat.NoOverlap2DConstraintProto)
NoOverlap2DConstraintProtoOrBuilder {
private static final long serialVersionUID = 0L;
// Use NoOverlap2DConstraintProto.newBuilder() to construct.
private NoOverlap2DConstraintProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private NoOverlap2DConstraintProto() {
xIntervals_ = emptyIntList();
yIntervals_ = emptyIntList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new NoOverlap2DConstraintProto();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private NoOverlap2DConstraintProto(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
xIntervals_ = newIntList();
mutable_bitField0_ |= 0x00000001;
}
xIntervals_.addInt(input.readInt32());
break;
}
case 10: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
xIntervals_ = newIntList();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
xIntervals_.addInt(input.readInt32());
}
input.popLimit(limit);
break;
}
case 16: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
yIntervals_ = newIntList();
mutable_bitField0_ |= 0x00000002;
}
yIntervals_.addInt(input.readInt32());
break;
}
case 18: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
yIntervals_ = newIntList();
mutable_bitField0_ |= 0x00000002;
}
while (input.getBytesUntilLimit() > 0) {
yIntervals_.addInt(input.readInt32());
}
input.popLimit(limit);
break;
}
case 24: {
boxesWithNullAreaCanOverlap_ = input.readBool();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
xIntervals_.makeImmutable(); // C
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
yIntervals_.makeImmutable(); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlap2DConstraintProto_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlap2DConstraintProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ortools.sat.NoOverlap2DConstraintProto.class, com.google.ortools.sat.NoOverlap2DConstraintProto.Builder.class);
}
public static final int X_INTERVALS_FIELD_NUMBER = 1;
private com.google.protobuf.Internal.IntList xIntervals_;
/**
* repeated int32 x_intervals = 1;
* @return A list containing the xIntervals.
*/
@java.lang.Override
public java.util.List
getXIntervalsList() {
return xIntervals_;
}
/**
* repeated int32 x_intervals = 1;
* @return The count of xIntervals.
*/
public int getXIntervalsCount() {
return xIntervals_.size();
}
/**
* repeated int32 x_intervals = 1;
* @param index The index of the element to return.
* @return The xIntervals at the given index.
*/
public int getXIntervals(int index) {
return xIntervals_.getInt(index);
}
private int xIntervalsMemoizedSerializedSize = -1;
public static final int Y_INTERVALS_FIELD_NUMBER = 2;
private com.google.protobuf.Internal.IntList yIntervals_;
/**
*
* Same size as x_intervals.
*
*
* repeated int32 y_intervals = 2;
* @return A list containing the yIntervals.
*/
@java.lang.Override
public java.util.List
getYIntervalsList() {
return yIntervals_;
}
/**
*
* Same size as x_intervals.
*
*
* repeated int32 y_intervals = 2;
* @return The count of yIntervals.
*/
public int getYIntervalsCount() {
return yIntervals_.size();
}
/**
*
* Same size as x_intervals.
*
*
* repeated int32 y_intervals = 2;
* @param index The index of the element to return.
* @return The yIntervals at the given index.
*/
public int getYIntervals(int index) {
return yIntervals_.getInt(index);
}
private int yIntervalsMemoizedSerializedSize = -1;
public static final int BOXES_WITH_NULL_AREA_CAN_OVERLAP_FIELD_NUMBER = 3;
private boolean boxesWithNullAreaCanOverlap_;
/**
* bool boxes_with_null_area_can_overlap = 3;
* @return The boxesWithNullAreaCanOverlap.
*/
@java.lang.Override
public boolean getBoxesWithNullAreaCanOverlap() {
return boxesWithNullAreaCanOverlap_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (getXIntervalsList().size() > 0) {
output.writeUInt32NoTag(10);
output.writeUInt32NoTag(xIntervalsMemoizedSerializedSize);
}
for (int i = 0; i < xIntervals_.size(); i++) {
output.writeInt32NoTag(xIntervals_.getInt(i));
}
if (getYIntervalsList().size() > 0) {
output.writeUInt32NoTag(18);
output.writeUInt32NoTag(yIntervalsMemoizedSerializedSize);
}
for (int i = 0; i < yIntervals_.size(); i++) {
output.writeInt32NoTag(yIntervals_.getInt(i));
}
if (boxesWithNullAreaCanOverlap_ != false) {
output.writeBool(3, boxesWithNullAreaCanOverlap_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < xIntervals_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(xIntervals_.getInt(i));
}
size += dataSize;
if (!getXIntervalsList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
xIntervalsMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < yIntervals_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(yIntervals_.getInt(i));
}
size += dataSize;
if (!getYIntervalsList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
yIntervalsMemoizedSerializedSize = dataSize;
}
if (boxesWithNullAreaCanOverlap_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, boxesWithNullAreaCanOverlap_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.ortools.sat.NoOverlap2DConstraintProto)) {
return super.equals(obj);
}
com.google.ortools.sat.NoOverlap2DConstraintProto other = (com.google.ortools.sat.NoOverlap2DConstraintProto) obj;
if (!getXIntervalsList()
.equals(other.getXIntervalsList())) return false;
if (!getYIntervalsList()
.equals(other.getYIntervalsList())) return false;
if (getBoxesWithNullAreaCanOverlap()
!= other.getBoxesWithNullAreaCanOverlap()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getXIntervalsCount() > 0) {
hash = (37 * hash) + X_INTERVALS_FIELD_NUMBER;
hash = (53 * hash) + getXIntervalsList().hashCode();
}
if (getYIntervalsCount() > 0) {
hash = (37 * hash) + Y_INTERVALS_FIELD_NUMBER;
hash = (53 * hash) + getYIntervalsList().hashCode();
}
hash = (37 * hash) + BOXES_WITH_NULL_AREA_CAN_OVERLAP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getBoxesWithNullAreaCanOverlap());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.ortools.sat.NoOverlap2DConstraintProto parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ortools.sat.NoOverlap2DConstraintProto parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ortools.sat.NoOverlap2DConstraintProto parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ortools.sat.NoOverlap2DConstraintProto parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ortools.sat.NoOverlap2DConstraintProto parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ortools.sat.NoOverlap2DConstraintProto parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ortools.sat.NoOverlap2DConstraintProto parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ortools.sat.NoOverlap2DConstraintProto parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.ortools.sat.NoOverlap2DConstraintProto parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.ortools.sat.NoOverlap2DConstraintProto parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.ortools.sat.NoOverlap2DConstraintProto parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ortools.sat.NoOverlap2DConstraintProto parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.ortools.sat.NoOverlap2DConstraintProto prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* The boxes defined by [start_x, end_x) * [start_y, end_y) cannot overlap.
*
*
* Protobuf type {@code operations_research.sat.NoOverlap2DConstraintProto}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:operations_research.sat.NoOverlap2DConstraintProto)
com.google.ortools.sat.NoOverlap2DConstraintProtoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlap2DConstraintProto_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlap2DConstraintProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ortools.sat.NoOverlap2DConstraintProto.class, com.google.ortools.sat.NoOverlap2DConstraintProto.Builder.class);
}
// Construct using com.google.ortools.sat.NoOverlap2DConstraintProto.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
xIntervals_ = emptyIntList();
bitField0_ = (bitField0_ & ~0x00000001);
yIntervals_ = emptyIntList();
bitField0_ = (bitField0_ & ~0x00000002);
boxesWithNullAreaCanOverlap_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlap2DConstraintProto_descriptor;
}
@java.lang.Override
public com.google.ortools.sat.NoOverlap2DConstraintProto getDefaultInstanceForType() {
return com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance();
}
@java.lang.Override
public com.google.ortools.sat.NoOverlap2DConstraintProto build() {
com.google.ortools.sat.NoOverlap2DConstraintProto result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.ortools.sat.NoOverlap2DConstraintProto buildPartial() {
com.google.ortools.sat.NoOverlap2DConstraintProto result = new com.google.ortools.sat.NoOverlap2DConstraintProto(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) != 0)) {
xIntervals_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.xIntervals_ = xIntervals_;
if (((bitField0_ & 0x00000002) != 0)) {
yIntervals_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.yIntervals_ = yIntervals_;
result.boxesWithNullAreaCanOverlap_ = boxesWithNullAreaCanOverlap_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.ortools.sat.NoOverlap2DConstraintProto) {
return mergeFrom((com.google.ortools.sat.NoOverlap2DConstraintProto)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.ortools.sat.NoOverlap2DConstraintProto other) {
if (other == com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance()) return this;
if (!other.xIntervals_.isEmpty()) {
if (xIntervals_.isEmpty()) {
xIntervals_ = other.xIntervals_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureXIntervalsIsMutable();
xIntervals_.addAll(other.xIntervals_);
}
onChanged();
}
if (!other.yIntervals_.isEmpty()) {
if (yIntervals_.isEmpty()) {
yIntervals_ = other.yIntervals_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureYIntervalsIsMutable();
yIntervals_.addAll(other.yIntervals_);
}
onChanged();
}
if (other.getBoxesWithNullAreaCanOverlap() != false) {
setBoxesWithNullAreaCanOverlap(other.getBoxesWithNullAreaCanOverlap());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.ortools.sat.NoOverlap2DConstraintProto parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.ortools.sat.NoOverlap2DConstraintProto) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.Internal.IntList xIntervals_ = emptyIntList();
private void ensureXIntervalsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
xIntervals_ = mutableCopy(xIntervals_);
bitField0_ |= 0x00000001;
}
}
/**
* repeated int32 x_intervals = 1;
* @return A list containing the xIntervals.
*/
public java.util.List
getXIntervalsList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(xIntervals_) : xIntervals_;
}
/**
* repeated int32 x_intervals = 1;
* @return The count of xIntervals.
*/
public int getXIntervalsCount() {
return xIntervals_.size();
}
/**
* repeated int32 x_intervals = 1;
* @param index The index of the element to return.
* @return The xIntervals at the given index.
*/
public int getXIntervals(int index) {
return xIntervals_.getInt(index);
}
/**
* repeated int32 x_intervals = 1;
* @param index The index to set the value at.
* @param value The xIntervals to set.
* @return This builder for chaining.
*/
public Builder setXIntervals(
int index, int value) {
ensureXIntervalsIsMutable();
xIntervals_.setInt(index, value);
onChanged();
return this;
}
/**
* repeated int32 x_intervals = 1;
* @param value The xIntervals to add.
* @return This builder for chaining.
*/
public Builder addXIntervals(int value) {
ensureXIntervalsIsMutable();
xIntervals_.addInt(value);
onChanged();
return this;
}
/**
* repeated int32 x_intervals = 1;
* @param values The xIntervals to add.
* @return This builder for chaining.
*/
public Builder addAllXIntervals(
java.lang.Iterable extends java.lang.Integer> values) {
ensureXIntervalsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, xIntervals_);
onChanged();
return this;
}
/**
* repeated int32 x_intervals = 1;
* @return This builder for chaining.
*/
public Builder clearXIntervals() {
xIntervals_ = emptyIntList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
private com.google.protobuf.Internal.IntList yIntervals_ = emptyIntList();
private void ensureYIntervalsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
yIntervals_ = mutableCopy(yIntervals_);
bitField0_ |= 0x00000002;
}
}
/**
*
* Same size as x_intervals.
*
*
* repeated int32 y_intervals = 2;
* @return A list containing the yIntervals.
*/
public java.util.List
getYIntervalsList() {
return ((bitField0_ & 0x00000002) != 0) ?
java.util.Collections.unmodifiableList(yIntervals_) : yIntervals_;
}
/**
*
* Same size as x_intervals.
*
*
* repeated int32 y_intervals = 2;
* @return The count of yIntervals.
*/
public int getYIntervalsCount() {
return yIntervals_.size();
}
/**
*
* Same size as x_intervals.
*
*
* repeated int32 y_intervals = 2;
* @param index The index of the element to return.
* @return The yIntervals at the given index.
*/
public int getYIntervals(int index) {
return yIntervals_.getInt(index);
}
/**
*
* Same size as x_intervals.
*
*
* repeated int32 y_intervals = 2;
* @param index The index to set the value at.
* @param value The yIntervals to set.
* @return This builder for chaining.
*/
public Builder setYIntervals(
int index, int value) {
ensureYIntervalsIsMutable();
yIntervals_.setInt(index, value);
onChanged();
return this;
}
/**
*
* Same size as x_intervals.
*
*
* repeated int32 y_intervals = 2;
* @param value The yIntervals to add.
* @return This builder for chaining.
*/
public Builder addYIntervals(int value) {
ensureYIntervalsIsMutable();
yIntervals_.addInt(value);
onChanged();
return this;
}
/**
*
* Same size as x_intervals.
*
*
* repeated int32 y_intervals = 2;
* @param values The yIntervals to add.
* @return This builder for chaining.
*/
public Builder addAllYIntervals(
java.lang.Iterable extends java.lang.Integer> values) {
ensureYIntervalsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, yIntervals_);
onChanged();
return this;
}
/**
*
* Same size as x_intervals.
*
*
* repeated int32 y_intervals = 2;
* @return This builder for chaining.
*/
public Builder clearYIntervals() {
yIntervals_ = emptyIntList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
private boolean boxesWithNullAreaCanOverlap_ ;
/**
* bool boxes_with_null_area_can_overlap = 3;
* @return The boxesWithNullAreaCanOverlap.
*/
@java.lang.Override
public boolean getBoxesWithNullAreaCanOverlap() {
return boxesWithNullAreaCanOverlap_;
}
/**
* bool boxes_with_null_area_can_overlap = 3;
* @param value The boxesWithNullAreaCanOverlap to set.
* @return This builder for chaining.
*/
public Builder setBoxesWithNullAreaCanOverlap(boolean value) {
boxesWithNullAreaCanOverlap_ = value;
onChanged();
return this;
}
/**
* bool boxes_with_null_area_can_overlap = 3;
* @return This builder for chaining.
*/
public Builder clearBoxesWithNullAreaCanOverlap() {
boxesWithNullAreaCanOverlap_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:operations_research.sat.NoOverlap2DConstraintProto)
}
// @@protoc_insertion_point(class_scope:operations_research.sat.NoOverlap2DConstraintProto)
private static final com.google.ortools.sat.NoOverlap2DConstraintProto DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.ortools.sat.NoOverlap2DConstraintProto();
}
public static com.google.ortools.sat.NoOverlap2DConstraintProto getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public NoOverlap2DConstraintProto parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new NoOverlap2DConstraintProto(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.ortools.sat.NoOverlap2DConstraintProto getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy