All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.ortools.sat.AutomatonConstraintProto 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;

/**
 * 
 * This constraint forces a sequence of variables to be accepted by an
 * automaton.
 * 
* * Protobuf type {@code operations_research.sat.AutomatonConstraintProto} */ public final class AutomatonConstraintProto extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:operations_research.sat.AutomatonConstraintProto) AutomatonConstraintProtoOrBuilder { private static final long serialVersionUID = 0L; // Use AutomatonConstraintProto.newBuilder() to construct. private AutomatonConstraintProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private AutomatonConstraintProto() { finalStates_ = emptyLongList(); transitionTail_ = emptyLongList(); transitionHead_ = emptyLongList(); transitionLabel_ = emptyLongList(); vars_ = emptyIntList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new AutomatonConstraintProto(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private AutomatonConstraintProto( 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 16: { startingState_ = input.readInt64(); break; } case 24: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { finalStates_ = newLongList(); mutable_bitField0_ |= 0x00000001; } finalStates_.addLong(input.readInt64()); break; } case 26: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { finalStates_ = newLongList(); mutable_bitField0_ |= 0x00000001; } while (input.getBytesUntilLimit() > 0) { finalStates_.addLong(input.readInt64()); } input.popLimit(limit); break; } case 32: { if (!((mutable_bitField0_ & 0x00000002) != 0)) { transitionTail_ = newLongList(); mutable_bitField0_ |= 0x00000002; } transitionTail_.addLong(input.readInt64()); break; } case 34: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { transitionTail_ = newLongList(); mutable_bitField0_ |= 0x00000002; } while (input.getBytesUntilLimit() > 0) { transitionTail_.addLong(input.readInt64()); } input.popLimit(limit); break; } case 40: { if (!((mutable_bitField0_ & 0x00000004) != 0)) { transitionHead_ = newLongList(); mutable_bitField0_ |= 0x00000004; } transitionHead_.addLong(input.readInt64()); break; } case 42: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) { transitionHead_ = newLongList(); mutable_bitField0_ |= 0x00000004; } while (input.getBytesUntilLimit() > 0) { transitionHead_.addLong(input.readInt64()); } input.popLimit(limit); break; } case 48: { if (!((mutable_bitField0_ & 0x00000008) != 0)) { transitionLabel_ = newLongList(); mutable_bitField0_ |= 0x00000008; } transitionLabel_.addLong(input.readInt64()); break; } case 50: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); if (!((mutable_bitField0_ & 0x00000008) != 0) && input.getBytesUntilLimit() > 0) { transitionLabel_ = newLongList(); mutable_bitField0_ |= 0x00000008; } while (input.getBytesUntilLimit() > 0) { transitionLabel_.addLong(input.readInt64()); } input.popLimit(limit); break; } case 56: { if (!((mutable_bitField0_ & 0x00000010) != 0)) { vars_ = newIntList(); mutable_bitField0_ |= 0x00000010; } vars_.addInt(input.readInt32()); break; } case 58: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) { vars_ = newIntList(); mutable_bitField0_ |= 0x00000010; } while (input.getBytesUntilLimit() > 0) { vars_.addInt(input.readInt32()); } input.popLimit(limit); 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)) { finalStates_.makeImmutable(); // C } if (((mutable_bitField0_ & 0x00000002) != 0)) { transitionTail_.makeImmutable(); // C } if (((mutable_bitField0_ & 0x00000004) != 0)) { transitionHead_.makeImmutable(); // C } if (((mutable_bitField0_ & 0x00000008) != 0)) { transitionLabel_.makeImmutable(); // C } if (((mutable_bitField0_ & 0x00000010) != 0)) { vars_.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_AutomatonConstraintProto_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AutomatonConstraintProto_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.ortools.sat.AutomatonConstraintProto.class, com.google.ortools.sat.AutomatonConstraintProto.Builder.class); } public static final int STARTING_STATE_FIELD_NUMBER = 2; private long startingState_; /** *
   * A state is identified by a non-negative number. It is preferable to keep
   * all the states dense in says [0, num_states). The automaton starts at
   * starting_state and must finish in any of the final states.
   * 
* * int64 starting_state = 2; * @return The startingState. */ @java.lang.Override public long getStartingState() { return startingState_; } public static final int FINAL_STATES_FIELD_NUMBER = 3; private com.google.protobuf.Internal.LongList finalStates_; /** * repeated int64 final_states = 3; * @return A list containing the finalStates. */ @java.lang.Override public java.util.List getFinalStatesList() { return finalStates_; } /** * repeated int64 final_states = 3; * @return The count of finalStates. */ public int getFinalStatesCount() { return finalStates_.size(); } /** * repeated int64 final_states = 3; * @param index The index of the element to return. * @return The finalStates at the given index. */ public long getFinalStates(int index) { return finalStates_.getLong(index); } private int finalStatesMemoizedSerializedSize = -1; public static final int TRANSITION_TAIL_FIELD_NUMBER = 4; private com.google.protobuf.Internal.LongList transitionTail_; /** *
   * List of transitions (all 3 vectors have the same size). Both tail and head
   * are states, label is any variable value. No two outgoing transitions from
   * the same state can have the same label.
   * 
* * repeated int64 transition_tail = 4; * @return A list containing the transitionTail. */ @java.lang.Override public java.util.List getTransitionTailList() { return transitionTail_; } /** *
   * List of transitions (all 3 vectors have the same size). Both tail and head
   * are states, label is any variable value. No two outgoing transitions from
   * the same state can have the same label.
   * 
* * repeated int64 transition_tail = 4; * @return The count of transitionTail. */ public int getTransitionTailCount() { return transitionTail_.size(); } /** *
   * List of transitions (all 3 vectors have the same size). Both tail and head
   * are states, label is any variable value. No two outgoing transitions from
   * the same state can have the same label.
   * 
* * repeated int64 transition_tail = 4; * @param index The index of the element to return. * @return The transitionTail at the given index. */ public long getTransitionTail(int index) { return transitionTail_.getLong(index); } private int transitionTailMemoizedSerializedSize = -1; public static final int TRANSITION_HEAD_FIELD_NUMBER = 5; private com.google.protobuf.Internal.LongList transitionHead_; /** * repeated int64 transition_head = 5; * @return A list containing the transitionHead. */ @java.lang.Override public java.util.List getTransitionHeadList() { return transitionHead_; } /** * repeated int64 transition_head = 5; * @return The count of transitionHead. */ public int getTransitionHeadCount() { return transitionHead_.size(); } /** * repeated int64 transition_head = 5; * @param index The index of the element to return. * @return The transitionHead at the given index. */ public long getTransitionHead(int index) { return transitionHead_.getLong(index); } private int transitionHeadMemoizedSerializedSize = -1; public static final int TRANSITION_LABEL_FIELD_NUMBER = 6; private com.google.protobuf.Internal.LongList transitionLabel_; /** * repeated int64 transition_label = 6; * @return A list containing the transitionLabel. */ @java.lang.Override public java.util.List getTransitionLabelList() { return transitionLabel_; } /** * repeated int64 transition_label = 6; * @return The count of transitionLabel. */ public int getTransitionLabelCount() { return transitionLabel_.size(); } /** * repeated int64 transition_label = 6; * @param index The index of the element to return. * @return The transitionLabel at the given index. */ public long getTransitionLabel(int index) { return transitionLabel_.getLong(index); } private int transitionLabelMemoizedSerializedSize = -1; public static final int VARS_FIELD_NUMBER = 7; private com.google.protobuf.Internal.IntList vars_; /** *
   * The sequence of variables. The automaton is ran for vars_size() "steps" and
   * the value of vars[i] corresponds to the transition label at step i.
   * 
* * repeated int32 vars = 7; * @return A list containing the vars. */ @java.lang.Override public java.util.List getVarsList() { return vars_; } /** *
   * The sequence of variables. The automaton is ran for vars_size() "steps" and
   * the value of vars[i] corresponds to the transition label at step i.
   * 
* * repeated int32 vars = 7; * @return The count of vars. */ public int getVarsCount() { return vars_.size(); } /** *
   * The sequence of variables. The automaton is ran for vars_size() "steps" and
   * the value of vars[i] corresponds to the transition label at step i.
   * 
* * repeated int32 vars = 7; * @param index The index of the element to return. * @return The vars at the given index. */ public int getVars(int index) { return vars_.getInt(index); } private int varsMemoizedSerializedSize = -1; 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 (startingState_ != 0L) { output.writeInt64(2, startingState_); } if (getFinalStatesList().size() > 0) { output.writeUInt32NoTag(26); output.writeUInt32NoTag(finalStatesMemoizedSerializedSize); } for (int i = 0; i < finalStates_.size(); i++) { output.writeInt64NoTag(finalStates_.getLong(i)); } if (getTransitionTailList().size() > 0) { output.writeUInt32NoTag(34); output.writeUInt32NoTag(transitionTailMemoizedSerializedSize); } for (int i = 0; i < transitionTail_.size(); i++) { output.writeInt64NoTag(transitionTail_.getLong(i)); } if (getTransitionHeadList().size() > 0) { output.writeUInt32NoTag(42); output.writeUInt32NoTag(transitionHeadMemoizedSerializedSize); } for (int i = 0; i < transitionHead_.size(); i++) { output.writeInt64NoTag(transitionHead_.getLong(i)); } if (getTransitionLabelList().size() > 0) { output.writeUInt32NoTag(50); output.writeUInt32NoTag(transitionLabelMemoizedSerializedSize); } for (int i = 0; i < transitionLabel_.size(); i++) { output.writeInt64NoTag(transitionLabel_.getLong(i)); } if (getVarsList().size() > 0) { output.writeUInt32NoTag(58); output.writeUInt32NoTag(varsMemoizedSerializedSize); } for (int i = 0; i < vars_.size(); i++) { output.writeInt32NoTag(vars_.getInt(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (startingState_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(2, startingState_); } { int dataSize = 0; for (int i = 0; i < finalStates_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeInt64SizeNoTag(finalStates_.getLong(i)); } size += dataSize; if (!getFinalStatesList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream .computeInt32SizeNoTag(dataSize); } finalStatesMemoizedSerializedSize = dataSize; } { int dataSize = 0; for (int i = 0; i < transitionTail_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeInt64SizeNoTag(transitionTail_.getLong(i)); } size += dataSize; if (!getTransitionTailList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream .computeInt32SizeNoTag(dataSize); } transitionTailMemoizedSerializedSize = dataSize; } { int dataSize = 0; for (int i = 0; i < transitionHead_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeInt64SizeNoTag(transitionHead_.getLong(i)); } size += dataSize; if (!getTransitionHeadList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream .computeInt32SizeNoTag(dataSize); } transitionHeadMemoizedSerializedSize = dataSize; } { int dataSize = 0; for (int i = 0; i < transitionLabel_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeInt64SizeNoTag(transitionLabel_.getLong(i)); } size += dataSize; if (!getTransitionLabelList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream .computeInt32SizeNoTag(dataSize); } transitionLabelMemoizedSerializedSize = dataSize; } { int dataSize = 0; for (int i = 0; i < vars_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeInt32SizeNoTag(vars_.getInt(i)); } size += dataSize; if (!getVarsList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream .computeInt32SizeNoTag(dataSize); } varsMemoizedSerializedSize = dataSize; } 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.AutomatonConstraintProto)) { return super.equals(obj); } com.google.ortools.sat.AutomatonConstraintProto other = (com.google.ortools.sat.AutomatonConstraintProto) obj; if (getStartingState() != other.getStartingState()) return false; if (!getFinalStatesList() .equals(other.getFinalStatesList())) return false; if (!getTransitionTailList() .equals(other.getTransitionTailList())) return false; if (!getTransitionHeadList() .equals(other.getTransitionHeadList())) return false; if (!getTransitionLabelList() .equals(other.getTransitionLabelList())) return false; if (!getVarsList() .equals(other.getVarsList())) 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(); hash = (37 * hash) + STARTING_STATE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getStartingState()); if (getFinalStatesCount() > 0) { hash = (37 * hash) + FINAL_STATES_FIELD_NUMBER; hash = (53 * hash) + getFinalStatesList().hashCode(); } if (getTransitionTailCount() > 0) { hash = (37 * hash) + TRANSITION_TAIL_FIELD_NUMBER; hash = (53 * hash) + getTransitionTailList().hashCode(); } if (getTransitionHeadCount() > 0) { hash = (37 * hash) + TRANSITION_HEAD_FIELD_NUMBER; hash = (53 * hash) + getTransitionHeadList().hashCode(); } if (getTransitionLabelCount() > 0) { hash = (37 * hash) + TRANSITION_LABEL_FIELD_NUMBER; hash = (53 * hash) + getTransitionLabelList().hashCode(); } if (getVarsCount() > 0) { hash = (37 * hash) + VARS_FIELD_NUMBER; hash = (53 * hash) + getVarsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.ortools.sat.AutomatonConstraintProto parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.ortools.sat.AutomatonConstraintProto 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.AutomatonConstraintProto parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.ortools.sat.AutomatonConstraintProto 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.AutomatonConstraintProto parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.ortools.sat.AutomatonConstraintProto parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.ortools.sat.AutomatonConstraintProto parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.ortools.sat.AutomatonConstraintProto 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.AutomatonConstraintProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.ortools.sat.AutomatonConstraintProto 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.AutomatonConstraintProto parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.ortools.sat.AutomatonConstraintProto 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.AutomatonConstraintProto 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; } /** *
   * This constraint forces a sequence of variables to be accepted by an
   * automaton.
   * 
* * Protobuf type {@code operations_research.sat.AutomatonConstraintProto} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:operations_research.sat.AutomatonConstraintProto) com.google.ortools.sat.AutomatonConstraintProtoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AutomatonConstraintProto_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AutomatonConstraintProto_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.ortools.sat.AutomatonConstraintProto.class, com.google.ortools.sat.AutomatonConstraintProto.Builder.class); } // Construct using com.google.ortools.sat.AutomatonConstraintProto.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(); startingState_ = 0L; finalStates_ = emptyLongList(); bitField0_ = (bitField0_ & ~0x00000001); transitionTail_ = emptyLongList(); bitField0_ = (bitField0_ & ~0x00000002); transitionHead_ = emptyLongList(); bitField0_ = (bitField0_ & ~0x00000004); transitionLabel_ = emptyLongList(); bitField0_ = (bitField0_ & ~0x00000008); vars_ = emptyIntList(); bitField0_ = (bitField0_ & ~0x00000010); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AutomatonConstraintProto_descriptor; } @java.lang.Override public com.google.ortools.sat.AutomatonConstraintProto getDefaultInstanceForType() { return com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance(); } @java.lang.Override public com.google.ortools.sat.AutomatonConstraintProto build() { com.google.ortools.sat.AutomatonConstraintProto result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.ortools.sat.AutomatonConstraintProto buildPartial() { com.google.ortools.sat.AutomatonConstraintProto result = new com.google.ortools.sat.AutomatonConstraintProto(this); int from_bitField0_ = bitField0_; result.startingState_ = startingState_; if (((bitField0_ & 0x00000001) != 0)) { finalStates_.makeImmutable(); bitField0_ = (bitField0_ & ~0x00000001); } result.finalStates_ = finalStates_; if (((bitField0_ & 0x00000002) != 0)) { transitionTail_.makeImmutable(); bitField0_ = (bitField0_ & ~0x00000002); } result.transitionTail_ = transitionTail_; if (((bitField0_ & 0x00000004) != 0)) { transitionHead_.makeImmutable(); bitField0_ = (bitField0_ & ~0x00000004); } result.transitionHead_ = transitionHead_; if (((bitField0_ & 0x00000008) != 0)) { transitionLabel_.makeImmutable(); bitField0_ = (bitField0_ & ~0x00000008); } result.transitionLabel_ = transitionLabel_; if (((bitField0_ & 0x00000010) != 0)) { vars_.makeImmutable(); bitField0_ = (bitField0_ & ~0x00000010); } result.vars_ = vars_; 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.AutomatonConstraintProto) { return mergeFrom((com.google.ortools.sat.AutomatonConstraintProto)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.ortools.sat.AutomatonConstraintProto other) { if (other == com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance()) return this; if (other.getStartingState() != 0L) { setStartingState(other.getStartingState()); } if (!other.finalStates_.isEmpty()) { if (finalStates_.isEmpty()) { finalStates_ = other.finalStates_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureFinalStatesIsMutable(); finalStates_.addAll(other.finalStates_); } onChanged(); } if (!other.transitionTail_.isEmpty()) { if (transitionTail_.isEmpty()) { transitionTail_ = other.transitionTail_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureTransitionTailIsMutable(); transitionTail_.addAll(other.transitionTail_); } onChanged(); } if (!other.transitionHead_.isEmpty()) { if (transitionHead_.isEmpty()) { transitionHead_ = other.transitionHead_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureTransitionHeadIsMutable(); transitionHead_.addAll(other.transitionHead_); } onChanged(); } if (!other.transitionLabel_.isEmpty()) { if (transitionLabel_.isEmpty()) { transitionLabel_ = other.transitionLabel_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureTransitionLabelIsMutable(); transitionLabel_.addAll(other.transitionLabel_); } onChanged(); } if (!other.vars_.isEmpty()) { if (vars_.isEmpty()) { vars_ = other.vars_; bitField0_ = (bitField0_ & ~0x00000010); } else { ensureVarsIsMutable(); vars_.addAll(other.vars_); } onChanged(); } 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.AutomatonConstraintProto parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.ortools.sat.AutomatonConstraintProto) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private long startingState_ ; /** *
     * A state is identified by a non-negative number. It is preferable to keep
     * all the states dense in says [0, num_states). The automaton starts at
     * starting_state and must finish in any of the final states.
     * 
* * int64 starting_state = 2; * @return The startingState. */ @java.lang.Override public long getStartingState() { return startingState_; } /** *
     * A state is identified by a non-negative number. It is preferable to keep
     * all the states dense in says [0, num_states). The automaton starts at
     * starting_state and must finish in any of the final states.
     * 
* * int64 starting_state = 2; * @param value The startingState to set. * @return This builder for chaining. */ public Builder setStartingState(long value) { startingState_ = value; onChanged(); return this; } /** *
     * A state is identified by a non-negative number. It is preferable to keep
     * all the states dense in says [0, num_states). The automaton starts at
     * starting_state and must finish in any of the final states.
     * 
* * int64 starting_state = 2; * @return This builder for chaining. */ public Builder clearStartingState() { startingState_ = 0L; onChanged(); return this; } private com.google.protobuf.Internal.LongList finalStates_ = emptyLongList(); private void ensureFinalStatesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { finalStates_ = mutableCopy(finalStates_); bitField0_ |= 0x00000001; } } /** * repeated int64 final_states = 3; * @return A list containing the finalStates. */ public java.util.List getFinalStatesList() { return ((bitField0_ & 0x00000001) != 0) ? java.util.Collections.unmodifiableList(finalStates_) : finalStates_; } /** * repeated int64 final_states = 3; * @return The count of finalStates. */ public int getFinalStatesCount() { return finalStates_.size(); } /** * repeated int64 final_states = 3; * @param index The index of the element to return. * @return The finalStates at the given index. */ public long getFinalStates(int index) { return finalStates_.getLong(index); } /** * repeated int64 final_states = 3; * @param index The index to set the value at. * @param value The finalStates to set. * @return This builder for chaining. */ public Builder setFinalStates( int index, long value) { ensureFinalStatesIsMutable(); finalStates_.setLong(index, value); onChanged(); return this; } /** * repeated int64 final_states = 3; * @param value The finalStates to add. * @return This builder for chaining. */ public Builder addFinalStates(long value) { ensureFinalStatesIsMutable(); finalStates_.addLong(value); onChanged(); return this; } /** * repeated int64 final_states = 3; * @param values The finalStates to add. * @return This builder for chaining. */ public Builder addAllFinalStates( java.lang.Iterable values) { ensureFinalStatesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, finalStates_); onChanged(); return this; } /** * repeated int64 final_states = 3; * @return This builder for chaining. */ public Builder clearFinalStates() { finalStates_ = emptyLongList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } private com.google.protobuf.Internal.LongList transitionTail_ = emptyLongList(); private void ensureTransitionTailIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { transitionTail_ = mutableCopy(transitionTail_); bitField0_ |= 0x00000002; } } /** *
     * List of transitions (all 3 vectors have the same size). Both tail and head
     * are states, label is any variable value. No two outgoing transitions from
     * the same state can have the same label.
     * 
* * repeated int64 transition_tail = 4; * @return A list containing the transitionTail. */ public java.util.List getTransitionTailList() { return ((bitField0_ & 0x00000002) != 0) ? java.util.Collections.unmodifiableList(transitionTail_) : transitionTail_; } /** *
     * List of transitions (all 3 vectors have the same size). Both tail and head
     * are states, label is any variable value. No two outgoing transitions from
     * the same state can have the same label.
     * 
* * repeated int64 transition_tail = 4; * @return The count of transitionTail. */ public int getTransitionTailCount() { return transitionTail_.size(); } /** *
     * List of transitions (all 3 vectors have the same size). Both tail and head
     * are states, label is any variable value. No two outgoing transitions from
     * the same state can have the same label.
     * 
* * repeated int64 transition_tail = 4; * @param index The index of the element to return. * @return The transitionTail at the given index. */ public long getTransitionTail(int index) { return transitionTail_.getLong(index); } /** *
     * List of transitions (all 3 vectors have the same size). Both tail and head
     * are states, label is any variable value. No two outgoing transitions from
     * the same state can have the same label.
     * 
* * repeated int64 transition_tail = 4; * @param index The index to set the value at. * @param value The transitionTail to set. * @return This builder for chaining. */ public Builder setTransitionTail( int index, long value) { ensureTransitionTailIsMutable(); transitionTail_.setLong(index, value); onChanged(); return this; } /** *
     * List of transitions (all 3 vectors have the same size). Both tail and head
     * are states, label is any variable value. No two outgoing transitions from
     * the same state can have the same label.
     * 
* * repeated int64 transition_tail = 4; * @param value The transitionTail to add. * @return This builder for chaining. */ public Builder addTransitionTail(long value) { ensureTransitionTailIsMutable(); transitionTail_.addLong(value); onChanged(); return this; } /** *
     * List of transitions (all 3 vectors have the same size). Both tail and head
     * are states, label is any variable value. No two outgoing transitions from
     * the same state can have the same label.
     * 
* * repeated int64 transition_tail = 4; * @param values The transitionTail to add. * @return This builder for chaining. */ public Builder addAllTransitionTail( java.lang.Iterable values) { ensureTransitionTailIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, transitionTail_); onChanged(); return this; } /** *
     * List of transitions (all 3 vectors have the same size). Both tail and head
     * are states, label is any variable value. No two outgoing transitions from
     * the same state can have the same label.
     * 
* * repeated int64 transition_tail = 4; * @return This builder for chaining. */ public Builder clearTransitionTail() { transitionTail_ = emptyLongList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } private com.google.protobuf.Internal.LongList transitionHead_ = emptyLongList(); private void ensureTransitionHeadIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { transitionHead_ = mutableCopy(transitionHead_); bitField0_ |= 0x00000004; } } /** * repeated int64 transition_head = 5; * @return A list containing the transitionHead. */ public java.util.List getTransitionHeadList() { return ((bitField0_ & 0x00000004) != 0) ? java.util.Collections.unmodifiableList(transitionHead_) : transitionHead_; } /** * repeated int64 transition_head = 5; * @return The count of transitionHead. */ public int getTransitionHeadCount() { return transitionHead_.size(); } /** * repeated int64 transition_head = 5; * @param index The index of the element to return. * @return The transitionHead at the given index. */ public long getTransitionHead(int index) { return transitionHead_.getLong(index); } /** * repeated int64 transition_head = 5; * @param index The index to set the value at. * @param value The transitionHead to set. * @return This builder for chaining. */ public Builder setTransitionHead( int index, long value) { ensureTransitionHeadIsMutable(); transitionHead_.setLong(index, value); onChanged(); return this; } /** * repeated int64 transition_head = 5; * @param value The transitionHead to add. * @return This builder for chaining. */ public Builder addTransitionHead(long value) { ensureTransitionHeadIsMutable(); transitionHead_.addLong(value); onChanged(); return this; } /** * repeated int64 transition_head = 5; * @param values The transitionHead to add. * @return This builder for chaining. */ public Builder addAllTransitionHead( java.lang.Iterable values) { ensureTransitionHeadIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, transitionHead_); onChanged(); return this; } /** * repeated int64 transition_head = 5; * @return This builder for chaining. */ public Builder clearTransitionHead() { transitionHead_ = emptyLongList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } private com.google.protobuf.Internal.LongList transitionLabel_ = emptyLongList(); private void ensureTransitionLabelIsMutable() { if (!((bitField0_ & 0x00000008) != 0)) { transitionLabel_ = mutableCopy(transitionLabel_); bitField0_ |= 0x00000008; } } /** * repeated int64 transition_label = 6; * @return A list containing the transitionLabel. */ public java.util.List getTransitionLabelList() { return ((bitField0_ & 0x00000008) != 0) ? java.util.Collections.unmodifiableList(transitionLabel_) : transitionLabel_; } /** * repeated int64 transition_label = 6; * @return The count of transitionLabel. */ public int getTransitionLabelCount() { return transitionLabel_.size(); } /** * repeated int64 transition_label = 6; * @param index The index of the element to return. * @return The transitionLabel at the given index. */ public long getTransitionLabel(int index) { return transitionLabel_.getLong(index); } /** * repeated int64 transition_label = 6; * @param index The index to set the value at. * @param value The transitionLabel to set. * @return This builder for chaining. */ public Builder setTransitionLabel( int index, long value) { ensureTransitionLabelIsMutable(); transitionLabel_.setLong(index, value); onChanged(); return this; } /** * repeated int64 transition_label = 6; * @param value The transitionLabel to add. * @return This builder for chaining. */ public Builder addTransitionLabel(long value) { ensureTransitionLabelIsMutable(); transitionLabel_.addLong(value); onChanged(); return this; } /** * repeated int64 transition_label = 6; * @param values The transitionLabel to add. * @return This builder for chaining. */ public Builder addAllTransitionLabel( java.lang.Iterable values) { ensureTransitionLabelIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, transitionLabel_); onChanged(); return this; } /** * repeated int64 transition_label = 6; * @return This builder for chaining. */ public Builder clearTransitionLabel() { transitionLabel_ = emptyLongList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } private com.google.protobuf.Internal.IntList vars_ = emptyIntList(); private void ensureVarsIsMutable() { if (!((bitField0_ & 0x00000010) != 0)) { vars_ = mutableCopy(vars_); bitField0_ |= 0x00000010; } } /** *
     * The sequence of variables. The automaton is ran for vars_size() "steps" and
     * the value of vars[i] corresponds to the transition label at step i.
     * 
* * repeated int32 vars = 7; * @return A list containing the vars. */ public java.util.List getVarsList() { return ((bitField0_ & 0x00000010) != 0) ? java.util.Collections.unmodifiableList(vars_) : vars_; } /** *
     * The sequence of variables. The automaton is ran for vars_size() "steps" and
     * the value of vars[i] corresponds to the transition label at step i.
     * 
* * repeated int32 vars = 7; * @return The count of vars. */ public int getVarsCount() { return vars_.size(); } /** *
     * The sequence of variables. The automaton is ran for vars_size() "steps" and
     * the value of vars[i] corresponds to the transition label at step i.
     * 
* * repeated int32 vars = 7; * @param index The index of the element to return. * @return The vars at the given index. */ public int getVars(int index) { return vars_.getInt(index); } /** *
     * The sequence of variables. The automaton is ran for vars_size() "steps" and
     * the value of vars[i] corresponds to the transition label at step i.
     * 
* * repeated int32 vars = 7; * @param index The index to set the value at. * @param value The vars to set. * @return This builder for chaining. */ public Builder setVars( int index, int value) { ensureVarsIsMutable(); vars_.setInt(index, value); onChanged(); return this; } /** *
     * The sequence of variables. The automaton is ran for vars_size() "steps" and
     * the value of vars[i] corresponds to the transition label at step i.
     * 
* * repeated int32 vars = 7; * @param value The vars to add. * @return This builder for chaining. */ public Builder addVars(int value) { ensureVarsIsMutable(); vars_.addInt(value); onChanged(); return this; } /** *
     * The sequence of variables. The automaton is ran for vars_size() "steps" and
     * the value of vars[i] corresponds to the transition label at step i.
     * 
* * repeated int32 vars = 7; * @param values The vars to add. * @return This builder for chaining. */ public Builder addAllVars( java.lang.Iterable values) { ensureVarsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, vars_); onChanged(); return this; } /** *
     * The sequence of variables. The automaton is ran for vars_size() "steps" and
     * the value of vars[i] corresponds to the transition label at step i.
     * 
* * repeated int32 vars = 7; * @return This builder for chaining. */ public Builder clearVars() { vars_ = emptyIntList(); bitField0_ = (bitField0_ & ~0x00000010); 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.AutomatonConstraintProto) } // @@protoc_insertion_point(class_scope:operations_research.sat.AutomatonConstraintProto) private static final com.google.ortools.sat.AutomatonConstraintProto DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.ortools.sat.AutomatonConstraintProto(); } public static com.google.ortools.sat.AutomatonConstraintProto getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public AutomatonConstraintProto parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new AutomatonConstraintProto(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.AutomatonConstraintProto getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy