Class SetCoverProto.Subset.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SetCoverProto.Subset.Builder>
com.google.ortools.algorithms.SetCoverProto.Subset.Builder
All Implemented Interfaces:
SetCoverProto.SubsetOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
SetCoverProto.Subset

public static final class SetCoverProto.Subset.Builder extends com.google.protobuf.GeneratedMessage.Builder<SetCoverProto.Subset.Builder> implements SetCoverProto.SubsetOrBuilder
Protobuf type operations_research.SetCoverProto.Subset
  • 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<SetCoverProto.Subset.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<SetCoverProto.Subset.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<SetCoverProto.Subset.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public SetCoverProto.Subset.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<SetCoverProto.Subset.Builder>
      Throws:
      IOException
    • hasCost

      public boolean hasCost()
       The cost for using the given subset.
       
      optional double cost = 1;
      Specified by:
      hasCost in interface SetCoverProto.SubsetOrBuilder
      Returns:
      Whether the cost field is set.
    • getCost

      public double getCost()
       The cost for using the given subset.
       
      optional double cost = 1;
      Specified by:
      getCost in interface SetCoverProto.SubsetOrBuilder
      Returns:
      The cost.
    • setCost

      public SetCoverProto.Subset.Builder setCost(double value)
       The cost for using the given subset.
       
      optional double cost = 1;
      Parameters:
      value - The cost to set.
      Returns:
      This builder for chaining.
    • clearCost

      public SetCoverProto.Subset.Builder clearCost()
       The cost for using the given subset.
       
      optional double cost = 1;
      Returns:
      This builder for chaining.
    • getElementList

      public List<Integer> getElementList()
       The list of elements in the subset.
       
      repeated int32 element = 2 [packed = true];
      Specified by:
      getElementList in interface SetCoverProto.SubsetOrBuilder
      Returns:
      A list containing the element.
    • getElementCount

      public int getElementCount()
       The list of elements in the subset.
       
      repeated int32 element = 2 [packed = true];
      Specified by:
      getElementCount in interface SetCoverProto.SubsetOrBuilder
      Returns:
      The count of element.
    • getElement

      public int getElement(int index)
       The list of elements in the subset.
       
      repeated int32 element = 2 [packed = true];
      Specified by:
      getElement in interface SetCoverProto.SubsetOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The element at the given index.
    • setElement

      public SetCoverProto.Subset.Builder setElement(int index, int value)
       The list of elements in the subset.
       
      repeated int32 element = 2 [packed = true];
      Parameters:
      index - The index to set the value at.
      value - The element to set.
      Returns:
      This builder for chaining.
    • addElement

      public SetCoverProto.Subset.Builder addElement(int value)
       The list of elements in the subset.
       
      repeated int32 element = 2 [packed = true];
      Parameters:
      value - The element to add.
      Returns:
      This builder for chaining.
    • addAllElement

      public SetCoverProto.Subset.Builder addAllElement(Iterable<? extends Integer> values)
       The list of elements in the subset.
       
      repeated int32 element = 2 [packed = true];
      Parameters:
      values - The element to add.
      Returns:
      This builder for chaining.
    • clearElement

      public SetCoverProto.Subset.Builder clearElement()
       The list of elements in the subset.
       
      repeated int32 element = 2 [packed = true];
      Returns:
      This builder for chaining.