org.tensorflow.metadata.v0.WeightedNumericStatistics Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow_metadata/proto/v0/statistics.proto
// Protobuf Java Version: 3.25.4
package org.tensorflow.metadata.v0;
/**
*
* Statistics for a weighted numeric feature in a dataset.
*
*
* Protobuf type {@code tensorflow.metadata.v0.WeightedNumericStatistics}
*/
public final class WeightedNumericStatistics extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.metadata.v0.WeightedNumericStatistics)
WeightedNumericStatisticsOrBuilder {
private static final long serialVersionUID = 0L;
// Use WeightedNumericStatistics.newBuilder() to construct.
private WeightedNumericStatistics(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private WeightedNumericStatistics() {
histograms_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new WeightedNumericStatistics();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_WeightedNumericStatistics_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_WeightedNumericStatistics_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.metadata.v0.WeightedNumericStatistics.class, org.tensorflow.metadata.v0.WeightedNumericStatistics.Builder.class);
}
public static final int MEAN_FIELD_NUMBER = 1;
private double mean_ = 0D;
/**
*
* The weighted mean of the values
*
*
* double mean = 1;
* @return The mean.
*/
@java.lang.Override
public double getMean() {
return mean_;
}
public static final int STD_DEV_FIELD_NUMBER = 2;
private double stdDev_ = 0D;
/**
*
* The weighted standard deviation of the values
*
*
* double std_dev = 2;
* @return The stdDev.
*/
@java.lang.Override
public double getStdDev() {
return stdDev_;
}
public static final int MEDIAN_FIELD_NUMBER = 3;
private double median_ = 0D;
/**
*
* The weighted median of the values
*
*
* double median = 3;
* @return The median.
*/
@java.lang.Override
public double getMedian() {
return median_;
}
public static final int HISTOGRAMS_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private java.util.List histograms_;
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
@java.lang.Override
public java.util.List getHistogramsList() {
return histograms_;
}
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
@java.lang.Override
public java.util.List extends org.tensorflow.metadata.v0.HistogramOrBuilder>
getHistogramsOrBuilderList() {
return histograms_;
}
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
@java.lang.Override
public int getHistogramsCount() {
return histograms_.size();
}
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
@java.lang.Override
public org.tensorflow.metadata.v0.Histogram getHistograms(int index) {
return histograms_.get(index);
}
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
@java.lang.Override
public org.tensorflow.metadata.v0.HistogramOrBuilder getHistogramsOrBuilder(
int index) {
return histograms_.get(index);
}
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 {
if (java.lang.Double.doubleToRawLongBits(mean_) != 0) {
output.writeDouble(1, mean_);
}
if (java.lang.Double.doubleToRawLongBits(stdDev_) != 0) {
output.writeDouble(2, stdDev_);
}
if (java.lang.Double.doubleToRawLongBits(median_) != 0) {
output.writeDouble(3, median_);
}
for (int i = 0; i < histograms_.size(); i++) {
output.writeMessage(4, histograms_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (java.lang.Double.doubleToRawLongBits(mean_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(1, mean_);
}
if (java.lang.Double.doubleToRawLongBits(stdDev_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, stdDev_);
}
if (java.lang.Double.doubleToRawLongBits(median_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(3, median_);
}
for (int i = 0; i < histograms_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, histograms_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.tensorflow.metadata.v0.WeightedNumericStatistics)) {
return super.equals(obj);
}
org.tensorflow.metadata.v0.WeightedNumericStatistics other = (org.tensorflow.metadata.v0.WeightedNumericStatistics) obj;
if (java.lang.Double.doubleToLongBits(getMean())
!= java.lang.Double.doubleToLongBits(
other.getMean())) return false;
if (java.lang.Double.doubleToLongBits(getStdDev())
!= java.lang.Double.doubleToLongBits(
other.getStdDev())) return false;
if (java.lang.Double.doubleToLongBits(getMedian())
!= java.lang.Double.doubleToLongBits(
other.getMedian())) return false;
if (!getHistogramsList()
.equals(other.getHistogramsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) 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) + MEAN_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getMean()));
hash = (37 * hash) + STD_DEV_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getStdDev()));
hash = (37 * hash) + MEDIAN_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getMedian()));
if (getHistogramsCount() > 0) {
hash = (37 * hash) + HISTOGRAMS_FIELD_NUMBER;
hash = (53 * hash) + getHistogramsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.metadata.v0.WeightedNumericStatistics parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.WeightedNumericStatistics parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.metadata.v0.WeightedNumericStatistics parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.WeightedNumericStatistics parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.metadata.v0.WeightedNumericStatistics parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.WeightedNumericStatistics parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.metadata.v0.WeightedNumericStatistics parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.WeightedNumericStatistics 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 org.tensorflow.metadata.v0.WeightedNumericStatistics parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.WeightedNumericStatistics 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 org.tensorflow.metadata.v0.WeightedNumericStatistics parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.WeightedNumericStatistics 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(org.tensorflow.metadata.v0.WeightedNumericStatistics 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;
}
/**
*
* Statistics for a weighted numeric feature in a dataset.
*
*
* Protobuf type {@code tensorflow.metadata.v0.WeightedNumericStatistics}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.metadata.v0.WeightedNumericStatistics)
org.tensorflow.metadata.v0.WeightedNumericStatisticsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_WeightedNumericStatistics_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_WeightedNumericStatistics_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.metadata.v0.WeightedNumericStatistics.class, org.tensorflow.metadata.v0.WeightedNumericStatistics.Builder.class);
}
// Construct using org.tensorflow.metadata.v0.WeightedNumericStatistics.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
mean_ = 0D;
stdDev_ = 0D;
median_ = 0D;
if (histogramsBuilder_ == null) {
histograms_ = java.util.Collections.emptyList();
} else {
histograms_ = null;
histogramsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_WeightedNumericStatistics_descriptor;
}
@java.lang.Override
public org.tensorflow.metadata.v0.WeightedNumericStatistics getDefaultInstanceForType() {
return org.tensorflow.metadata.v0.WeightedNumericStatistics.getDefaultInstance();
}
@java.lang.Override
public org.tensorflow.metadata.v0.WeightedNumericStatistics build() {
org.tensorflow.metadata.v0.WeightedNumericStatistics result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.tensorflow.metadata.v0.WeightedNumericStatistics buildPartial() {
org.tensorflow.metadata.v0.WeightedNumericStatistics result = new org.tensorflow.metadata.v0.WeightedNumericStatistics(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(org.tensorflow.metadata.v0.WeightedNumericStatistics result) {
if (histogramsBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)) {
histograms_ = java.util.Collections.unmodifiableList(histograms_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.histograms_ = histograms_;
} else {
result.histograms_ = histogramsBuilder_.build();
}
}
private void buildPartial0(org.tensorflow.metadata.v0.WeightedNumericStatistics result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.mean_ = mean_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.stdDev_ = stdDev_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.median_ = median_;
}
}
@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 org.tensorflow.metadata.v0.WeightedNumericStatistics) {
return mergeFrom((org.tensorflow.metadata.v0.WeightedNumericStatistics)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.metadata.v0.WeightedNumericStatistics other) {
if (other == org.tensorflow.metadata.v0.WeightedNumericStatistics.getDefaultInstance()) return this;
if (other.getMean() != 0D) {
setMean(other.getMean());
}
if (other.getStdDev() != 0D) {
setStdDev(other.getStdDev());
}
if (other.getMedian() != 0D) {
setMedian(other.getMedian());
}
if (histogramsBuilder_ == null) {
if (!other.histograms_.isEmpty()) {
if (histograms_.isEmpty()) {
histograms_ = other.histograms_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureHistogramsIsMutable();
histograms_.addAll(other.histograms_);
}
onChanged();
}
} else {
if (!other.histograms_.isEmpty()) {
if (histogramsBuilder_.isEmpty()) {
histogramsBuilder_.dispose();
histogramsBuilder_ = null;
histograms_ = other.histograms_;
bitField0_ = (bitField0_ & ~0x00000008);
histogramsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getHistogramsFieldBuilder() : null;
} else {
histogramsBuilder_.addAllMessages(other.histograms_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 9: {
mean_ = input.readDouble();
bitField0_ |= 0x00000001;
break;
} // case 9
case 17: {
stdDev_ = input.readDouble();
bitField0_ |= 0x00000002;
break;
} // case 17
case 25: {
median_ = input.readDouble();
bitField0_ |= 0x00000004;
break;
} // case 25
case 34: {
org.tensorflow.metadata.v0.Histogram m =
input.readMessage(
org.tensorflow.metadata.v0.Histogram.parser(),
extensionRegistry);
if (histogramsBuilder_ == null) {
ensureHistogramsIsMutable();
histograms_.add(m);
} else {
histogramsBuilder_.addMessage(m);
}
break;
} // case 34
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private double mean_ ;
/**
*
* The weighted mean of the values
*
*
* double mean = 1;
* @return The mean.
*/
@java.lang.Override
public double getMean() {
return mean_;
}
/**
*
* The weighted mean of the values
*
*
* double mean = 1;
* @param value The mean to set.
* @return This builder for chaining.
*/
public Builder setMean(double value) {
mean_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The weighted mean of the values
*
*
* double mean = 1;
* @return This builder for chaining.
*/
public Builder clearMean() {
bitField0_ = (bitField0_ & ~0x00000001);
mean_ = 0D;
onChanged();
return this;
}
private double stdDev_ ;
/**
*
* The weighted standard deviation of the values
*
*
* double std_dev = 2;
* @return The stdDev.
*/
@java.lang.Override
public double getStdDev() {
return stdDev_;
}
/**
*
* The weighted standard deviation of the values
*
*
* double std_dev = 2;
* @param value The stdDev to set.
* @return This builder for chaining.
*/
public Builder setStdDev(double value) {
stdDev_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The weighted standard deviation of the values
*
*
* double std_dev = 2;
* @return This builder for chaining.
*/
public Builder clearStdDev() {
bitField0_ = (bitField0_ & ~0x00000002);
stdDev_ = 0D;
onChanged();
return this;
}
private double median_ ;
/**
*
* The weighted median of the values
*
*
* double median = 3;
* @return The median.
*/
@java.lang.Override
public double getMedian() {
return median_;
}
/**
*
* The weighted median of the values
*
*
* double median = 3;
* @param value The median to set.
* @return This builder for chaining.
*/
public Builder setMedian(double value) {
median_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The weighted median of the values
*
*
* double median = 3;
* @return This builder for chaining.
*/
public Builder clearMedian() {
bitField0_ = (bitField0_ & ~0x00000004);
median_ = 0D;
onChanged();
return this;
}
private java.util.List histograms_ =
java.util.Collections.emptyList();
private void ensureHistogramsIsMutable() {
if (!((bitField0_ & 0x00000008) != 0)) {
histograms_ = new java.util.ArrayList(histograms_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.metadata.v0.Histogram, org.tensorflow.metadata.v0.Histogram.Builder, org.tensorflow.metadata.v0.HistogramOrBuilder> histogramsBuilder_;
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
public java.util.List getHistogramsList() {
if (histogramsBuilder_ == null) {
return java.util.Collections.unmodifiableList(histograms_);
} else {
return histogramsBuilder_.getMessageList();
}
}
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
public int getHistogramsCount() {
if (histogramsBuilder_ == null) {
return histograms_.size();
} else {
return histogramsBuilder_.getCount();
}
}
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
public org.tensorflow.metadata.v0.Histogram getHistograms(int index) {
if (histogramsBuilder_ == null) {
return histograms_.get(index);
} else {
return histogramsBuilder_.getMessage(index);
}
}
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
public Builder setHistograms(
int index, org.tensorflow.metadata.v0.Histogram value) {
if (histogramsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHistogramsIsMutable();
histograms_.set(index, value);
onChanged();
} else {
histogramsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
public Builder setHistograms(
int index, org.tensorflow.metadata.v0.Histogram.Builder builderForValue) {
if (histogramsBuilder_ == null) {
ensureHistogramsIsMutable();
histograms_.set(index, builderForValue.build());
onChanged();
} else {
histogramsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
public Builder addHistograms(org.tensorflow.metadata.v0.Histogram value) {
if (histogramsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHistogramsIsMutable();
histograms_.add(value);
onChanged();
} else {
histogramsBuilder_.addMessage(value);
}
return this;
}
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
public Builder addHistograms(
int index, org.tensorflow.metadata.v0.Histogram value) {
if (histogramsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHistogramsIsMutable();
histograms_.add(index, value);
onChanged();
} else {
histogramsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
public Builder addHistograms(
org.tensorflow.metadata.v0.Histogram.Builder builderForValue) {
if (histogramsBuilder_ == null) {
ensureHistogramsIsMutable();
histograms_.add(builderForValue.build());
onChanged();
} else {
histogramsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
public Builder addHistograms(
int index, org.tensorflow.metadata.v0.Histogram.Builder builderForValue) {
if (histogramsBuilder_ == null) {
ensureHistogramsIsMutable();
histograms_.add(index, builderForValue.build());
onChanged();
} else {
histogramsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
public Builder addAllHistograms(
java.lang.Iterable extends org.tensorflow.metadata.v0.Histogram> values) {
if (histogramsBuilder_ == null) {
ensureHistogramsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, histograms_);
onChanged();
} else {
histogramsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
public Builder clearHistograms() {
if (histogramsBuilder_ == null) {
histograms_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
histogramsBuilder_.clear();
}
return this;
}
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
public Builder removeHistograms(int index) {
if (histogramsBuilder_ == null) {
ensureHistogramsIsMutable();
histograms_.remove(index);
onChanged();
} else {
histogramsBuilder_.remove(index);
}
return this;
}
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
public org.tensorflow.metadata.v0.Histogram.Builder getHistogramsBuilder(
int index) {
return getHistogramsFieldBuilder().getBuilder(index);
}
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
public org.tensorflow.metadata.v0.HistogramOrBuilder getHistogramsOrBuilder(
int index) {
if (histogramsBuilder_ == null) {
return histograms_.get(index); } else {
return histogramsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
public java.util.List extends org.tensorflow.metadata.v0.HistogramOrBuilder>
getHistogramsOrBuilderList() {
if (histogramsBuilder_ != null) {
return histogramsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(histograms_);
}
}
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
public org.tensorflow.metadata.v0.Histogram.Builder addHistogramsBuilder() {
return getHistogramsFieldBuilder().addBuilder(
org.tensorflow.metadata.v0.Histogram.getDefaultInstance());
}
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
public org.tensorflow.metadata.v0.Histogram.Builder addHistogramsBuilder(
int index) {
return getHistogramsFieldBuilder().addBuilder(
index, org.tensorflow.metadata.v0.Histogram.getDefaultInstance());
}
/**
*
* The histogram(s) of the weighted feature values.
*
*
* repeated .tensorflow.metadata.v0.Histogram histograms = 4;
*/
public java.util.List
getHistogramsBuilderList() {
return getHistogramsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.metadata.v0.Histogram, org.tensorflow.metadata.v0.Histogram.Builder, org.tensorflow.metadata.v0.HistogramOrBuilder>
getHistogramsFieldBuilder() {
if (histogramsBuilder_ == null) {
histogramsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.metadata.v0.Histogram, org.tensorflow.metadata.v0.Histogram.Builder, org.tensorflow.metadata.v0.HistogramOrBuilder>(
histograms_,
((bitField0_ & 0x00000008) != 0),
getParentForChildren(),
isClean());
histograms_ = null;
}
return histogramsBuilder_;
}
@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:tensorflow.metadata.v0.WeightedNumericStatistics)
}
// @@protoc_insertion_point(class_scope:tensorflow.metadata.v0.WeightedNumericStatistics)
private static final org.tensorflow.metadata.v0.WeightedNumericStatistics DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.metadata.v0.WeightedNumericStatistics();
}
public static org.tensorflow.metadata.v0.WeightedNumericStatistics getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public WeightedNumericStatistics parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.tensorflow.metadata.v0.WeightedNumericStatistics getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy