Package com.google.ortools.algorithms
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 Summary
Modifier and TypeMethodDescriptionaddAllElement(Iterable<? extends Integer> values) The list of elements in the subset.addElement(int value) The list of elements in the subset.build()clear()The cost for using the given subset.The list of elements in the subset.doublegetCost()The cost for using the given subset.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorintgetElement(int index) The list of elements in the subset.intThe list of elements in the subset.The list of elements in the subset.booleanhasCost()The cost for using the given subset.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(SetCoverProto.Subset other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setCost(double value) The cost for using the given subset.setElement(int index, int value) The list of elements in the subset.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<SetCoverProto.Subset.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<SetCoverProto.Subset.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<SetCoverProto.Subset.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<SetCoverProto.Subset.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.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:
hasCostin interfaceSetCoverProto.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:
getCostin interfaceSetCoverProto.SubsetOrBuilder- Returns:
- The cost.
-
setCost
The cost for using the given subset.
optional double cost = 1;- Parameters:
value- The cost to set.- Returns:
- This builder for chaining.
-
clearCost
The cost for using the given subset.
optional double cost = 1;- Returns:
- This builder for chaining.
-
getElementList
The list of elements in the subset.
repeated int32 element = 2 [packed = true];- Specified by:
getElementListin interfaceSetCoverProto.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:
getElementCountin interfaceSetCoverProto.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:
getElementin interfaceSetCoverProto.SubsetOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The element at the given index.
-
setElement
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
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
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
The list of elements in the subset.
repeated int32 element = 2 [packed = true];- Returns:
- This builder for chaining.
-