org.tensorflow.metadata.v0.StringStatistics 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 string feature in a dataset.
*
*
* Protobuf type {@code tensorflow.metadata.v0.StringStatistics}
*/
public final class StringStatistics extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.metadata.v0.StringStatistics)
StringStatisticsOrBuilder {
private static final long serialVersionUID = 0L;
// Use StringStatistics.newBuilder() to construct.
private StringStatistics(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private StringStatistics() {
topValues_ = java.util.Collections.emptyList();
vocabularyFile_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new StringStatistics();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_StringStatistics_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_StringStatistics_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.metadata.v0.StringStatistics.class, org.tensorflow.metadata.v0.StringStatistics.Builder.class);
}
public interface FreqAndValueOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.metadata.v0.StringStatistics.FreqAndValue)
com.google.protobuf.MessageOrBuilder {
/**
* string value = 2;
* @return The value.
*/
java.lang.String getValue();
/**
* string value = 2;
* @return The bytes for value.
*/
com.google.protobuf.ByteString
getValueBytes();
/**
*
* The number of times the value occurs. Stored as a double to be able to
* handle weighted features.
*
*
* double frequency = 3;
* @return The frequency.
*/
double getFrequency();
}
/**
* Protobuf type {@code tensorflow.metadata.v0.StringStatistics.FreqAndValue}
*/
public static final class FreqAndValue extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.metadata.v0.StringStatistics.FreqAndValue)
FreqAndValueOrBuilder {
private static final long serialVersionUID = 0L;
// Use FreqAndValue.newBuilder() to construct.
private FreqAndValue(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private FreqAndValue() {
value_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new FreqAndValue();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_StringStatistics_FreqAndValue_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_StringStatistics_FreqAndValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.metadata.v0.StringStatistics.FreqAndValue.class, org.tensorflow.metadata.v0.StringStatistics.FreqAndValue.Builder.class);
}
public static final int VALUE_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object value_ = "";
/**
* string value = 2;
* @return The value.
*/
@java.lang.Override
public java.lang.String getValue() {
java.lang.Object ref = value_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
value_ = s;
return s;
}
}
/**
* string value = 2;
* @return The bytes for value.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getValueBytes() {
java.lang.Object ref = value_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
value_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FREQUENCY_FIELD_NUMBER = 3;
private double frequency_ = 0D;
/**
*
* The number of times the value occurs. Stored as a double to be able to
* handle weighted features.
*
*
* double frequency = 3;
* @return The frequency.
*/
@java.lang.Override
public double getFrequency() {
return frequency_;
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_);
}
if (java.lang.Double.doubleToRawLongBits(frequency_) != 0) {
output.writeDouble(3, frequency_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_);
}
if (java.lang.Double.doubleToRawLongBits(frequency_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(3, frequency_);
}
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.StringStatistics.FreqAndValue)) {
return super.equals(obj);
}
org.tensorflow.metadata.v0.StringStatistics.FreqAndValue other = (org.tensorflow.metadata.v0.StringStatistics.FreqAndValue) obj;
if (!getValue()
.equals(other.getValue())) return false;
if (java.lang.Double.doubleToLongBits(getFrequency())
!= java.lang.Double.doubleToLongBits(
other.getFrequency())) 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) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValue().hashCode();
hash = (37 * hash) + FREQUENCY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getFrequency()));
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.metadata.v0.StringStatistics.FreqAndValue parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.StringStatistics.FreqAndValue 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.StringStatistics.FreqAndValue parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.StringStatistics.FreqAndValue 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.StringStatistics.FreqAndValue parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.StringStatistics.FreqAndValue parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.metadata.v0.StringStatistics.FreqAndValue parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.StringStatistics.FreqAndValue 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.StringStatistics.FreqAndValue parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.StringStatistics.FreqAndValue 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.StringStatistics.FreqAndValue parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.StringStatistics.FreqAndValue 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.StringStatistics.FreqAndValue 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;
}
/**
* Protobuf type {@code tensorflow.metadata.v0.StringStatistics.FreqAndValue}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.metadata.v0.StringStatistics.FreqAndValue)
org.tensorflow.metadata.v0.StringStatistics.FreqAndValueOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_StringStatistics_FreqAndValue_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_StringStatistics_FreqAndValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.metadata.v0.StringStatistics.FreqAndValue.class, org.tensorflow.metadata.v0.StringStatistics.FreqAndValue.Builder.class);
}
// Construct using org.tensorflow.metadata.v0.StringStatistics.FreqAndValue.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
value_ = "";
frequency_ = 0D;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_StringStatistics_FreqAndValue_descriptor;
}
@java.lang.Override
public org.tensorflow.metadata.v0.StringStatistics.FreqAndValue getDefaultInstanceForType() {
return org.tensorflow.metadata.v0.StringStatistics.FreqAndValue.getDefaultInstance();
}
@java.lang.Override
public org.tensorflow.metadata.v0.StringStatistics.FreqAndValue build() {
org.tensorflow.metadata.v0.StringStatistics.FreqAndValue result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.tensorflow.metadata.v0.StringStatistics.FreqAndValue buildPartial() {
org.tensorflow.metadata.v0.StringStatistics.FreqAndValue result = new org.tensorflow.metadata.v0.StringStatistics.FreqAndValue(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.tensorflow.metadata.v0.StringStatistics.FreqAndValue result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.value_ = value_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.frequency_ = frequency_;
}
}
@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.StringStatistics.FreqAndValue) {
return mergeFrom((org.tensorflow.metadata.v0.StringStatistics.FreqAndValue)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.metadata.v0.StringStatistics.FreqAndValue other) {
if (other == org.tensorflow.metadata.v0.StringStatistics.FreqAndValue.getDefaultInstance()) return this;
if (!other.getValue().isEmpty()) {
value_ = other.value_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.getFrequency() != 0D) {
setFrequency(other.getFrequency());
}
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 18: {
value_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 18
case 25: {
frequency_ = input.readDouble();
bitField0_ |= 0x00000002;
break;
} // case 25
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 java.lang.Object value_ = "";
/**
* string value = 2;
* @return The value.
*/
public java.lang.String getValue() {
java.lang.Object ref = value_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
value_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string value = 2;
* @return The bytes for value.
*/
public com.google.protobuf.ByteString
getValueBytes() {
java.lang.Object ref = value_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
value_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string value = 2;
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
value_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* string value = 2;
* @return This builder for chaining.
*/
public Builder clearValue() {
value_ = getDefaultInstance().getValue();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* string value = 2;
* @param value The bytes for value to set.
* @return This builder for chaining.
*/
public Builder setValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
value_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private double frequency_ ;
/**
*
* The number of times the value occurs. Stored as a double to be able to
* handle weighted features.
*
*
* double frequency = 3;
* @return The frequency.
*/
@java.lang.Override
public double getFrequency() {
return frequency_;
}
/**
*
* The number of times the value occurs. Stored as a double to be able to
* handle weighted features.
*
*
* double frequency = 3;
* @param value The frequency to set.
* @return This builder for chaining.
*/
public Builder setFrequency(double value) {
frequency_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The number of times the value occurs. Stored as a double to be able to
* handle weighted features.
*
*
* double frequency = 3;
* @return This builder for chaining.
*/
public Builder clearFrequency() {
bitField0_ = (bitField0_ & ~0x00000002);
frequency_ = 0D;
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:tensorflow.metadata.v0.StringStatistics.FreqAndValue)
}
// @@protoc_insertion_point(class_scope:tensorflow.metadata.v0.StringStatistics.FreqAndValue)
private static final org.tensorflow.metadata.v0.StringStatistics.FreqAndValue DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.metadata.v0.StringStatistics.FreqAndValue();
}
public static org.tensorflow.metadata.v0.StringStatistics.FreqAndValue getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public FreqAndValue 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.StringStatistics.FreqAndValue getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int COMMON_STATS_FIELD_NUMBER = 1;
private org.tensorflow.metadata.v0.CommonStatistics commonStats_;
/**
* .tensorflow.metadata.v0.CommonStatistics common_stats = 1;
* @return Whether the commonStats field is set.
*/
@java.lang.Override
public boolean hasCommonStats() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* .tensorflow.metadata.v0.CommonStatistics common_stats = 1;
* @return The commonStats.
*/
@java.lang.Override
public org.tensorflow.metadata.v0.CommonStatistics getCommonStats() {
return commonStats_ == null ? org.tensorflow.metadata.v0.CommonStatistics.getDefaultInstance() : commonStats_;
}
/**
* .tensorflow.metadata.v0.CommonStatistics common_stats = 1;
*/
@java.lang.Override
public org.tensorflow.metadata.v0.CommonStatisticsOrBuilder getCommonStatsOrBuilder() {
return commonStats_ == null ? org.tensorflow.metadata.v0.CommonStatistics.getDefaultInstance() : commonStats_;
}
public static final int UNIQUE_FIELD_NUMBER = 2;
private long unique_ = 0L;
/**
*
* The number of unique values
*
*
* uint64 unique = 2;
* @return The unique.
*/
@java.lang.Override
public long getUnique() {
return unique_;
}
public static final int TOP_VALUES_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private java.util.List topValues_;
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
@java.lang.Override
public java.util.List getTopValuesList() {
return topValues_;
}
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
@java.lang.Override
public java.util.List extends org.tensorflow.metadata.v0.StringStatistics.FreqAndValueOrBuilder>
getTopValuesOrBuilderList() {
return topValues_;
}
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
@java.lang.Override
public int getTopValuesCount() {
return topValues_.size();
}
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
@java.lang.Override
public org.tensorflow.metadata.v0.StringStatistics.FreqAndValue getTopValues(int index) {
return topValues_.get(index);
}
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
@java.lang.Override
public org.tensorflow.metadata.v0.StringStatistics.FreqAndValueOrBuilder getTopValuesOrBuilder(
int index) {
return topValues_.get(index);
}
public static final int AVG_LENGTH_FIELD_NUMBER = 4;
private float avgLength_ = 0F;
/**
*
* The average length of the values
*
*
* float avg_length = 4;
* @return The avgLength.
*/
@java.lang.Override
public float getAvgLength() {
return avgLength_;
}
public static final int RANK_HISTOGRAM_FIELD_NUMBER = 5;
private org.tensorflow.metadata.v0.RankHistogram rankHistogram_;
/**
*
* The rank histogram for the values of the feature.
* The rank is used to measure of how commonly the value is found in the
* dataset. The most common value would have a rank of 1, with the second-most
* common value having a rank of 2, and so on.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
* @return Whether the rankHistogram field is set.
*/
@java.lang.Override
public boolean hasRankHistogram() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The rank histogram for the values of the feature.
* The rank is used to measure of how commonly the value is found in the
* dataset. The most common value would have a rank of 1, with the second-most
* common value having a rank of 2, and so on.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
* @return The rankHistogram.
*/
@java.lang.Override
public org.tensorflow.metadata.v0.RankHistogram getRankHistogram() {
return rankHistogram_ == null ? org.tensorflow.metadata.v0.RankHistogram.getDefaultInstance() : rankHistogram_;
}
/**
*
* The rank histogram for the values of the feature.
* The rank is used to measure of how commonly the value is found in the
* dataset. The most common value would have a rank of 1, with the second-most
* common value having a rank of 2, and so on.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
*/
@java.lang.Override
public org.tensorflow.metadata.v0.RankHistogramOrBuilder getRankHistogramOrBuilder() {
return rankHistogram_ == null ? org.tensorflow.metadata.v0.RankHistogram.getDefaultInstance() : rankHistogram_;
}
public static final int WEIGHTED_STRING_STATS_FIELD_NUMBER = 6;
private org.tensorflow.metadata.v0.WeightedStringStatistics weightedStringStats_;
/**
*
* Weighted statistics for the feature, if the values have weights.
*
*
* .tensorflow.metadata.v0.WeightedStringStatistics weighted_string_stats = 6;
* @return Whether the weightedStringStats field is set.
*/
@java.lang.Override
public boolean hasWeightedStringStats() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Weighted statistics for the feature, if the values have weights.
*
*
* .tensorflow.metadata.v0.WeightedStringStatistics weighted_string_stats = 6;
* @return The weightedStringStats.
*/
@java.lang.Override
public org.tensorflow.metadata.v0.WeightedStringStatistics getWeightedStringStats() {
return weightedStringStats_ == null ? org.tensorflow.metadata.v0.WeightedStringStatistics.getDefaultInstance() : weightedStringStats_;
}
/**
*
* Weighted statistics for the feature, if the values have weights.
*
*
* .tensorflow.metadata.v0.WeightedStringStatistics weighted_string_stats = 6;
*/
@java.lang.Override
public org.tensorflow.metadata.v0.WeightedStringStatisticsOrBuilder getWeightedStringStatsOrBuilder() {
return weightedStringStats_ == null ? org.tensorflow.metadata.v0.WeightedStringStatistics.getDefaultInstance() : weightedStringStats_;
}
public static final int VOCABULARY_FILE_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private volatile java.lang.Object vocabularyFile_ = "";
/**
*
* A vocabulary file, used for vocabularies too large to store in the proto
* itself. Note that the file may be relative to some context-dependent
* directory. E.g. in TFX the feature statistics will live in a PPP and
* vocabulary file names will be relative to this PPP.
*
*
* string vocabulary_file = 7;
* @return The vocabularyFile.
*/
@java.lang.Override
public java.lang.String getVocabularyFile() {
java.lang.Object ref = vocabularyFile_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
vocabularyFile_ = s;
return s;
}
}
/**
*
* A vocabulary file, used for vocabularies too large to store in the proto
* itself. Note that the file may be relative to some context-dependent
* directory. E.g. in TFX the feature statistics will live in a PPP and
* vocabulary file names will be relative to this PPP.
*
*
* string vocabulary_file = 7;
* @return The bytes for vocabularyFile.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getVocabularyFileBytes() {
java.lang.Object ref = vocabularyFile_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
vocabularyFile_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INVALID_UTF8_COUNT_FIELD_NUMBER = 8;
private long invalidUtf8Count_ = 0L;
/**
*
* Counts the number of invalid utf8 strings present in leaf arrays for this
* feature. Validation is only performed for byte- or string-like features (
* those having type BYTES or STRING).
*
*
* uint64 invalid_utf8_count = 8;
* @return The invalidUtf8Count.
*/
@java.lang.Override
public long getInvalidUtf8Count() {
return invalidUtf8Count_;
}
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 (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getCommonStats());
}
if (unique_ != 0L) {
output.writeUInt64(2, unique_);
}
for (int i = 0; i < topValues_.size(); i++) {
output.writeMessage(3, topValues_.get(i));
}
if (java.lang.Float.floatToRawIntBits(avgLength_) != 0) {
output.writeFloat(4, avgLength_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(5, getRankHistogram());
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(6, getWeightedStringStats());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vocabularyFile_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, vocabularyFile_);
}
if (invalidUtf8Count_ != 0L) {
output.writeUInt64(8, invalidUtf8Count_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getCommonStats());
}
if (unique_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(2, unique_);
}
for (int i = 0; i < topValues_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, topValues_.get(i));
}
if (java.lang.Float.floatToRawIntBits(avgLength_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(4, avgLength_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getRankHistogram());
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getWeightedStringStats());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vocabularyFile_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, vocabularyFile_);
}
if (invalidUtf8Count_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(8, invalidUtf8Count_);
}
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.StringStatistics)) {
return super.equals(obj);
}
org.tensorflow.metadata.v0.StringStatistics other = (org.tensorflow.metadata.v0.StringStatistics) obj;
if (hasCommonStats() != other.hasCommonStats()) return false;
if (hasCommonStats()) {
if (!getCommonStats()
.equals(other.getCommonStats())) return false;
}
if (getUnique()
!= other.getUnique()) return false;
if (!getTopValuesList()
.equals(other.getTopValuesList())) return false;
if (java.lang.Float.floatToIntBits(getAvgLength())
!= java.lang.Float.floatToIntBits(
other.getAvgLength())) return false;
if (hasRankHistogram() != other.hasRankHistogram()) return false;
if (hasRankHistogram()) {
if (!getRankHistogram()
.equals(other.getRankHistogram())) return false;
}
if (hasWeightedStringStats() != other.hasWeightedStringStats()) return false;
if (hasWeightedStringStats()) {
if (!getWeightedStringStats()
.equals(other.getWeightedStringStats())) return false;
}
if (!getVocabularyFile()
.equals(other.getVocabularyFile())) return false;
if (getInvalidUtf8Count()
!= other.getInvalidUtf8Count()) 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();
if (hasCommonStats()) {
hash = (37 * hash) + COMMON_STATS_FIELD_NUMBER;
hash = (53 * hash) + getCommonStats().hashCode();
}
hash = (37 * hash) + UNIQUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getUnique());
if (getTopValuesCount() > 0) {
hash = (37 * hash) + TOP_VALUES_FIELD_NUMBER;
hash = (53 * hash) + getTopValuesList().hashCode();
}
hash = (37 * hash) + AVG_LENGTH_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getAvgLength());
if (hasRankHistogram()) {
hash = (37 * hash) + RANK_HISTOGRAM_FIELD_NUMBER;
hash = (53 * hash) + getRankHistogram().hashCode();
}
if (hasWeightedStringStats()) {
hash = (37 * hash) + WEIGHTED_STRING_STATS_FIELD_NUMBER;
hash = (53 * hash) + getWeightedStringStats().hashCode();
}
hash = (37 * hash) + VOCABULARY_FILE_FIELD_NUMBER;
hash = (53 * hash) + getVocabularyFile().hashCode();
hash = (37 * hash) + INVALID_UTF8_COUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getInvalidUtf8Count());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.metadata.v0.StringStatistics parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.StringStatistics 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.StringStatistics parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.StringStatistics 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.StringStatistics parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.StringStatistics parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.metadata.v0.StringStatistics parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.StringStatistics 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.StringStatistics parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.StringStatistics 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.StringStatistics parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.StringStatistics 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.StringStatistics 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 string feature in a dataset.
*
*
* Protobuf type {@code tensorflow.metadata.v0.StringStatistics}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.metadata.v0.StringStatistics)
org.tensorflow.metadata.v0.StringStatisticsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_StringStatistics_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_StringStatistics_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.metadata.v0.StringStatistics.class, org.tensorflow.metadata.v0.StringStatistics.Builder.class);
}
// Construct using org.tensorflow.metadata.v0.StringStatistics.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getCommonStatsFieldBuilder();
getTopValuesFieldBuilder();
getRankHistogramFieldBuilder();
getWeightedStringStatsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
commonStats_ = null;
if (commonStatsBuilder_ != null) {
commonStatsBuilder_.dispose();
commonStatsBuilder_ = null;
}
unique_ = 0L;
if (topValuesBuilder_ == null) {
topValues_ = java.util.Collections.emptyList();
} else {
topValues_ = null;
topValuesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
avgLength_ = 0F;
rankHistogram_ = null;
if (rankHistogramBuilder_ != null) {
rankHistogramBuilder_.dispose();
rankHistogramBuilder_ = null;
}
weightedStringStats_ = null;
if (weightedStringStatsBuilder_ != null) {
weightedStringStatsBuilder_.dispose();
weightedStringStatsBuilder_ = null;
}
vocabularyFile_ = "";
invalidUtf8Count_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_StringStatistics_descriptor;
}
@java.lang.Override
public org.tensorflow.metadata.v0.StringStatistics getDefaultInstanceForType() {
return org.tensorflow.metadata.v0.StringStatistics.getDefaultInstance();
}
@java.lang.Override
public org.tensorflow.metadata.v0.StringStatistics build() {
org.tensorflow.metadata.v0.StringStatistics result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.tensorflow.metadata.v0.StringStatistics buildPartial() {
org.tensorflow.metadata.v0.StringStatistics result = new org.tensorflow.metadata.v0.StringStatistics(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(org.tensorflow.metadata.v0.StringStatistics result) {
if (topValuesBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
topValues_ = java.util.Collections.unmodifiableList(topValues_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.topValues_ = topValues_;
} else {
result.topValues_ = topValuesBuilder_.build();
}
}
private void buildPartial0(org.tensorflow.metadata.v0.StringStatistics result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.commonStats_ = commonStatsBuilder_ == null
? commonStats_
: commonStatsBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.unique_ = unique_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.avgLength_ = avgLength_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.rankHistogram_ = rankHistogramBuilder_ == null
? rankHistogram_
: rankHistogramBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.weightedStringStats_ = weightedStringStatsBuilder_ == null
? weightedStringStats_
: weightedStringStatsBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.vocabularyFile_ = vocabularyFile_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.invalidUtf8Count_ = invalidUtf8Count_;
}
result.bitField0_ |= to_bitField0_;
}
@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.StringStatistics) {
return mergeFrom((org.tensorflow.metadata.v0.StringStatistics)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.metadata.v0.StringStatistics other) {
if (other == org.tensorflow.metadata.v0.StringStatistics.getDefaultInstance()) return this;
if (other.hasCommonStats()) {
mergeCommonStats(other.getCommonStats());
}
if (other.getUnique() != 0L) {
setUnique(other.getUnique());
}
if (topValuesBuilder_ == null) {
if (!other.topValues_.isEmpty()) {
if (topValues_.isEmpty()) {
topValues_ = other.topValues_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureTopValuesIsMutable();
topValues_.addAll(other.topValues_);
}
onChanged();
}
} else {
if (!other.topValues_.isEmpty()) {
if (topValuesBuilder_.isEmpty()) {
topValuesBuilder_.dispose();
topValuesBuilder_ = null;
topValues_ = other.topValues_;
bitField0_ = (bitField0_ & ~0x00000004);
topValuesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getTopValuesFieldBuilder() : null;
} else {
topValuesBuilder_.addAllMessages(other.topValues_);
}
}
}
if (other.getAvgLength() != 0F) {
setAvgLength(other.getAvgLength());
}
if (other.hasRankHistogram()) {
mergeRankHistogram(other.getRankHistogram());
}
if (other.hasWeightedStringStats()) {
mergeWeightedStringStats(other.getWeightedStringStats());
}
if (!other.getVocabularyFile().isEmpty()) {
vocabularyFile_ = other.vocabularyFile_;
bitField0_ |= 0x00000040;
onChanged();
}
if (other.getInvalidUtf8Count() != 0L) {
setInvalidUtf8Count(other.getInvalidUtf8Count());
}
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 10: {
input.readMessage(
getCommonStatsFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
unique_ = input.readUInt64();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26: {
org.tensorflow.metadata.v0.StringStatistics.FreqAndValue m =
input.readMessage(
org.tensorflow.metadata.v0.StringStatistics.FreqAndValue.parser(),
extensionRegistry);
if (topValuesBuilder_ == null) {
ensureTopValuesIsMutable();
topValues_.add(m);
} else {
topValuesBuilder_.addMessage(m);
}
break;
} // case 26
case 37: {
avgLength_ = input.readFloat();
bitField0_ |= 0x00000008;
break;
} // case 37
case 42: {
input.readMessage(
getRankHistogramFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
case 50: {
input.readMessage(
getWeightedStringStatsFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 50
case 58: {
vocabularyFile_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000040;
break;
} // case 58
case 64: {
invalidUtf8Count_ = input.readUInt64();
bitField0_ |= 0x00000080;
break;
} // case 64
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 org.tensorflow.metadata.v0.CommonStatistics commonStats_;
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.CommonStatistics, org.tensorflow.metadata.v0.CommonStatistics.Builder, org.tensorflow.metadata.v0.CommonStatisticsOrBuilder> commonStatsBuilder_;
/**
* .tensorflow.metadata.v0.CommonStatistics common_stats = 1;
* @return Whether the commonStats field is set.
*/
public boolean hasCommonStats() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* .tensorflow.metadata.v0.CommonStatistics common_stats = 1;
* @return The commonStats.
*/
public org.tensorflow.metadata.v0.CommonStatistics getCommonStats() {
if (commonStatsBuilder_ == null) {
return commonStats_ == null ? org.tensorflow.metadata.v0.CommonStatistics.getDefaultInstance() : commonStats_;
} else {
return commonStatsBuilder_.getMessage();
}
}
/**
* .tensorflow.metadata.v0.CommonStatistics common_stats = 1;
*/
public Builder setCommonStats(org.tensorflow.metadata.v0.CommonStatistics value) {
if (commonStatsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
commonStats_ = value;
} else {
commonStatsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .tensorflow.metadata.v0.CommonStatistics common_stats = 1;
*/
public Builder setCommonStats(
org.tensorflow.metadata.v0.CommonStatistics.Builder builderForValue) {
if (commonStatsBuilder_ == null) {
commonStats_ = builderForValue.build();
} else {
commonStatsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .tensorflow.metadata.v0.CommonStatistics common_stats = 1;
*/
public Builder mergeCommonStats(org.tensorflow.metadata.v0.CommonStatistics value) {
if (commonStatsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
commonStats_ != null &&
commonStats_ != org.tensorflow.metadata.v0.CommonStatistics.getDefaultInstance()) {
getCommonStatsBuilder().mergeFrom(value);
} else {
commonStats_ = value;
}
} else {
commonStatsBuilder_.mergeFrom(value);
}
if (commonStats_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
* .tensorflow.metadata.v0.CommonStatistics common_stats = 1;
*/
public Builder clearCommonStats() {
bitField0_ = (bitField0_ & ~0x00000001);
commonStats_ = null;
if (commonStatsBuilder_ != null) {
commonStatsBuilder_.dispose();
commonStatsBuilder_ = null;
}
onChanged();
return this;
}
/**
* .tensorflow.metadata.v0.CommonStatistics common_stats = 1;
*/
public org.tensorflow.metadata.v0.CommonStatistics.Builder getCommonStatsBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getCommonStatsFieldBuilder().getBuilder();
}
/**
* .tensorflow.metadata.v0.CommonStatistics common_stats = 1;
*/
public org.tensorflow.metadata.v0.CommonStatisticsOrBuilder getCommonStatsOrBuilder() {
if (commonStatsBuilder_ != null) {
return commonStatsBuilder_.getMessageOrBuilder();
} else {
return commonStats_ == null ?
org.tensorflow.metadata.v0.CommonStatistics.getDefaultInstance() : commonStats_;
}
}
/**
* .tensorflow.metadata.v0.CommonStatistics common_stats = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.CommonStatistics, org.tensorflow.metadata.v0.CommonStatistics.Builder, org.tensorflow.metadata.v0.CommonStatisticsOrBuilder>
getCommonStatsFieldBuilder() {
if (commonStatsBuilder_ == null) {
commonStatsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.CommonStatistics, org.tensorflow.metadata.v0.CommonStatistics.Builder, org.tensorflow.metadata.v0.CommonStatisticsOrBuilder>(
getCommonStats(),
getParentForChildren(),
isClean());
commonStats_ = null;
}
return commonStatsBuilder_;
}
private long unique_ ;
/**
*
* The number of unique values
*
*
* uint64 unique = 2;
* @return The unique.
*/
@java.lang.Override
public long getUnique() {
return unique_;
}
/**
*
* The number of unique values
*
*
* uint64 unique = 2;
* @param value The unique to set.
* @return This builder for chaining.
*/
public Builder setUnique(long value) {
unique_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The number of unique values
*
*
* uint64 unique = 2;
* @return This builder for chaining.
*/
public Builder clearUnique() {
bitField0_ = (bitField0_ & ~0x00000002);
unique_ = 0L;
onChanged();
return this;
}
private java.util.List topValues_ =
java.util.Collections.emptyList();
private void ensureTopValuesIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
topValues_ = new java.util.ArrayList(topValues_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.metadata.v0.StringStatistics.FreqAndValue, org.tensorflow.metadata.v0.StringStatistics.FreqAndValue.Builder, org.tensorflow.metadata.v0.StringStatistics.FreqAndValueOrBuilder> topValuesBuilder_;
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
public java.util.List getTopValuesList() {
if (topValuesBuilder_ == null) {
return java.util.Collections.unmodifiableList(topValues_);
} else {
return topValuesBuilder_.getMessageList();
}
}
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
public int getTopValuesCount() {
if (topValuesBuilder_ == null) {
return topValues_.size();
} else {
return topValuesBuilder_.getCount();
}
}
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
public org.tensorflow.metadata.v0.StringStatistics.FreqAndValue getTopValues(int index) {
if (topValuesBuilder_ == null) {
return topValues_.get(index);
} else {
return topValuesBuilder_.getMessage(index);
}
}
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
public Builder setTopValues(
int index, org.tensorflow.metadata.v0.StringStatistics.FreqAndValue value) {
if (topValuesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTopValuesIsMutable();
topValues_.set(index, value);
onChanged();
} else {
topValuesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
public Builder setTopValues(
int index, org.tensorflow.metadata.v0.StringStatistics.FreqAndValue.Builder builderForValue) {
if (topValuesBuilder_ == null) {
ensureTopValuesIsMutable();
topValues_.set(index, builderForValue.build());
onChanged();
} else {
topValuesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
public Builder addTopValues(org.tensorflow.metadata.v0.StringStatistics.FreqAndValue value) {
if (topValuesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTopValuesIsMutable();
topValues_.add(value);
onChanged();
} else {
topValuesBuilder_.addMessage(value);
}
return this;
}
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
public Builder addTopValues(
int index, org.tensorflow.metadata.v0.StringStatistics.FreqAndValue value) {
if (topValuesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTopValuesIsMutable();
topValues_.add(index, value);
onChanged();
} else {
topValuesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
public Builder addTopValues(
org.tensorflow.metadata.v0.StringStatistics.FreqAndValue.Builder builderForValue) {
if (topValuesBuilder_ == null) {
ensureTopValuesIsMutable();
topValues_.add(builderForValue.build());
onChanged();
} else {
topValuesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
public Builder addTopValues(
int index, org.tensorflow.metadata.v0.StringStatistics.FreqAndValue.Builder builderForValue) {
if (topValuesBuilder_ == null) {
ensureTopValuesIsMutable();
topValues_.add(index, builderForValue.build());
onChanged();
} else {
topValuesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
public Builder addAllTopValues(
java.lang.Iterable extends org.tensorflow.metadata.v0.StringStatistics.FreqAndValue> values) {
if (topValuesBuilder_ == null) {
ensureTopValuesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, topValues_);
onChanged();
} else {
topValuesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
public Builder clearTopValues() {
if (topValuesBuilder_ == null) {
topValues_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
topValuesBuilder_.clear();
}
return this;
}
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
public Builder removeTopValues(int index) {
if (topValuesBuilder_ == null) {
ensureTopValuesIsMutable();
topValues_.remove(index);
onChanged();
} else {
topValuesBuilder_.remove(index);
}
return this;
}
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
public org.tensorflow.metadata.v0.StringStatistics.FreqAndValue.Builder getTopValuesBuilder(
int index) {
return getTopValuesFieldBuilder().getBuilder(index);
}
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
public org.tensorflow.metadata.v0.StringStatistics.FreqAndValueOrBuilder getTopValuesOrBuilder(
int index) {
if (topValuesBuilder_ == null) {
return topValues_.get(index); } else {
return topValuesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
public java.util.List extends org.tensorflow.metadata.v0.StringStatistics.FreqAndValueOrBuilder>
getTopValuesOrBuilderList() {
if (topValuesBuilder_ != null) {
return topValuesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(topValues_);
}
}
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
public org.tensorflow.metadata.v0.StringStatistics.FreqAndValue.Builder addTopValuesBuilder() {
return getTopValuesFieldBuilder().addBuilder(
org.tensorflow.metadata.v0.StringStatistics.FreqAndValue.getDefaultInstance());
}
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
public org.tensorflow.metadata.v0.StringStatistics.FreqAndValue.Builder addTopValuesBuilder(
int index) {
return getTopValuesFieldBuilder().addBuilder(
index, org.tensorflow.metadata.v0.StringStatistics.FreqAndValue.getDefaultInstance());
}
/**
*
* A sorted list of the most-frequent values and their frequencies, with
* the most-frequent being first.
*
*
* repeated .tensorflow.metadata.v0.StringStatistics.FreqAndValue top_values = 3;
*/
public java.util.List
getTopValuesBuilderList() {
return getTopValuesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.metadata.v0.StringStatistics.FreqAndValue, org.tensorflow.metadata.v0.StringStatistics.FreqAndValue.Builder, org.tensorflow.metadata.v0.StringStatistics.FreqAndValueOrBuilder>
getTopValuesFieldBuilder() {
if (topValuesBuilder_ == null) {
topValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.metadata.v0.StringStatistics.FreqAndValue, org.tensorflow.metadata.v0.StringStatistics.FreqAndValue.Builder, org.tensorflow.metadata.v0.StringStatistics.FreqAndValueOrBuilder>(
topValues_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
topValues_ = null;
}
return topValuesBuilder_;
}
private float avgLength_ ;
/**
*
* The average length of the values
*
*
* float avg_length = 4;
* @return The avgLength.
*/
@java.lang.Override
public float getAvgLength() {
return avgLength_;
}
/**
*
* The average length of the values
*
*
* float avg_length = 4;
* @param value The avgLength to set.
* @return This builder for chaining.
*/
public Builder setAvgLength(float value) {
avgLength_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* The average length of the values
*
*
* float avg_length = 4;
* @return This builder for chaining.
*/
public Builder clearAvgLength() {
bitField0_ = (bitField0_ & ~0x00000008);
avgLength_ = 0F;
onChanged();
return this;
}
private org.tensorflow.metadata.v0.RankHistogram rankHistogram_;
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.RankHistogram, org.tensorflow.metadata.v0.RankHistogram.Builder, org.tensorflow.metadata.v0.RankHistogramOrBuilder> rankHistogramBuilder_;
/**
*
* The rank histogram for the values of the feature.
* The rank is used to measure of how commonly the value is found in the
* dataset. The most common value would have a rank of 1, with the second-most
* common value having a rank of 2, and so on.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
* @return Whether the rankHistogram field is set.
*/
public boolean hasRankHistogram() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* The rank histogram for the values of the feature.
* The rank is used to measure of how commonly the value is found in the
* dataset. The most common value would have a rank of 1, with the second-most
* common value having a rank of 2, and so on.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
* @return The rankHistogram.
*/
public org.tensorflow.metadata.v0.RankHistogram getRankHistogram() {
if (rankHistogramBuilder_ == null) {
return rankHistogram_ == null ? org.tensorflow.metadata.v0.RankHistogram.getDefaultInstance() : rankHistogram_;
} else {
return rankHistogramBuilder_.getMessage();
}
}
/**
*
* The rank histogram for the values of the feature.
* The rank is used to measure of how commonly the value is found in the
* dataset. The most common value would have a rank of 1, with the second-most
* common value having a rank of 2, and so on.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
*/
public Builder setRankHistogram(org.tensorflow.metadata.v0.RankHistogram value) {
if (rankHistogramBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
rankHistogram_ = value;
} else {
rankHistogramBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* The rank histogram for the values of the feature.
* The rank is used to measure of how commonly the value is found in the
* dataset. The most common value would have a rank of 1, with the second-most
* common value having a rank of 2, and so on.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
*/
public Builder setRankHistogram(
org.tensorflow.metadata.v0.RankHistogram.Builder builderForValue) {
if (rankHistogramBuilder_ == null) {
rankHistogram_ = builderForValue.build();
} else {
rankHistogramBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* The rank histogram for the values of the feature.
* The rank is used to measure of how commonly the value is found in the
* dataset. The most common value would have a rank of 1, with the second-most
* common value having a rank of 2, and so on.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
*/
public Builder mergeRankHistogram(org.tensorflow.metadata.v0.RankHistogram value) {
if (rankHistogramBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
rankHistogram_ != null &&
rankHistogram_ != org.tensorflow.metadata.v0.RankHistogram.getDefaultInstance()) {
getRankHistogramBuilder().mergeFrom(value);
} else {
rankHistogram_ = value;
}
} else {
rankHistogramBuilder_.mergeFrom(value);
}
if (rankHistogram_ != null) {
bitField0_ |= 0x00000010;
onChanged();
}
return this;
}
/**
*
* The rank histogram for the values of the feature.
* The rank is used to measure of how commonly the value is found in the
* dataset. The most common value would have a rank of 1, with the second-most
* common value having a rank of 2, and so on.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
*/
public Builder clearRankHistogram() {
bitField0_ = (bitField0_ & ~0x00000010);
rankHistogram_ = null;
if (rankHistogramBuilder_ != null) {
rankHistogramBuilder_.dispose();
rankHistogramBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The rank histogram for the values of the feature.
* The rank is used to measure of how commonly the value is found in the
* dataset. The most common value would have a rank of 1, with the second-most
* common value having a rank of 2, and so on.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
*/
public org.tensorflow.metadata.v0.RankHistogram.Builder getRankHistogramBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getRankHistogramFieldBuilder().getBuilder();
}
/**
*
* The rank histogram for the values of the feature.
* The rank is used to measure of how commonly the value is found in the
* dataset. The most common value would have a rank of 1, with the second-most
* common value having a rank of 2, and so on.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
*/
public org.tensorflow.metadata.v0.RankHistogramOrBuilder getRankHistogramOrBuilder() {
if (rankHistogramBuilder_ != null) {
return rankHistogramBuilder_.getMessageOrBuilder();
} else {
return rankHistogram_ == null ?
org.tensorflow.metadata.v0.RankHistogram.getDefaultInstance() : rankHistogram_;
}
}
/**
*
* The rank histogram for the values of the feature.
* The rank is used to measure of how commonly the value is found in the
* dataset. The most common value would have a rank of 1, with the second-most
* common value having a rank of 2, and so on.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.RankHistogram, org.tensorflow.metadata.v0.RankHistogram.Builder, org.tensorflow.metadata.v0.RankHistogramOrBuilder>
getRankHistogramFieldBuilder() {
if (rankHistogramBuilder_ == null) {
rankHistogramBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.RankHistogram, org.tensorflow.metadata.v0.RankHistogram.Builder, org.tensorflow.metadata.v0.RankHistogramOrBuilder>(
getRankHistogram(),
getParentForChildren(),
isClean());
rankHistogram_ = null;
}
return rankHistogramBuilder_;
}
private org.tensorflow.metadata.v0.WeightedStringStatistics weightedStringStats_;
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.WeightedStringStatistics, org.tensorflow.metadata.v0.WeightedStringStatistics.Builder, org.tensorflow.metadata.v0.WeightedStringStatisticsOrBuilder> weightedStringStatsBuilder_;
/**
*
* Weighted statistics for the feature, if the values have weights.
*
*
* .tensorflow.metadata.v0.WeightedStringStatistics weighted_string_stats = 6;
* @return Whether the weightedStringStats field is set.
*/
public boolean hasWeightedStringStats() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* Weighted statistics for the feature, if the values have weights.
*
*
* .tensorflow.metadata.v0.WeightedStringStatistics weighted_string_stats = 6;
* @return The weightedStringStats.
*/
public org.tensorflow.metadata.v0.WeightedStringStatistics getWeightedStringStats() {
if (weightedStringStatsBuilder_ == null) {
return weightedStringStats_ == null ? org.tensorflow.metadata.v0.WeightedStringStatistics.getDefaultInstance() : weightedStringStats_;
} else {
return weightedStringStatsBuilder_.getMessage();
}
}
/**
*
* Weighted statistics for the feature, if the values have weights.
*
*
* .tensorflow.metadata.v0.WeightedStringStatistics weighted_string_stats = 6;
*/
public Builder setWeightedStringStats(org.tensorflow.metadata.v0.WeightedStringStatistics value) {
if (weightedStringStatsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
weightedStringStats_ = value;
} else {
weightedStringStatsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* Weighted statistics for the feature, if the values have weights.
*
*
* .tensorflow.metadata.v0.WeightedStringStatistics weighted_string_stats = 6;
*/
public Builder setWeightedStringStats(
org.tensorflow.metadata.v0.WeightedStringStatistics.Builder builderForValue) {
if (weightedStringStatsBuilder_ == null) {
weightedStringStats_ = builderForValue.build();
} else {
weightedStringStatsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* Weighted statistics for the feature, if the values have weights.
*
*
* .tensorflow.metadata.v0.WeightedStringStatistics weighted_string_stats = 6;
*/
public Builder mergeWeightedStringStats(org.tensorflow.metadata.v0.WeightedStringStatistics value) {
if (weightedStringStatsBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0) &&
weightedStringStats_ != null &&
weightedStringStats_ != org.tensorflow.metadata.v0.WeightedStringStatistics.getDefaultInstance()) {
getWeightedStringStatsBuilder().mergeFrom(value);
} else {
weightedStringStats_ = value;
}
} else {
weightedStringStatsBuilder_.mergeFrom(value);
}
if (weightedStringStats_ != null) {
bitField0_ |= 0x00000020;
onChanged();
}
return this;
}
/**
*
* Weighted statistics for the feature, if the values have weights.
*
*
* .tensorflow.metadata.v0.WeightedStringStatistics weighted_string_stats = 6;
*/
public Builder clearWeightedStringStats() {
bitField0_ = (bitField0_ & ~0x00000020);
weightedStringStats_ = null;
if (weightedStringStatsBuilder_ != null) {
weightedStringStatsBuilder_.dispose();
weightedStringStatsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Weighted statistics for the feature, if the values have weights.
*
*
* .tensorflow.metadata.v0.WeightedStringStatistics weighted_string_stats = 6;
*/
public org.tensorflow.metadata.v0.WeightedStringStatistics.Builder getWeightedStringStatsBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getWeightedStringStatsFieldBuilder().getBuilder();
}
/**
*
* Weighted statistics for the feature, if the values have weights.
*
*
* .tensorflow.metadata.v0.WeightedStringStatistics weighted_string_stats = 6;
*/
public org.tensorflow.metadata.v0.WeightedStringStatisticsOrBuilder getWeightedStringStatsOrBuilder() {
if (weightedStringStatsBuilder_ != null) {
return weightedStringStatsBuilder_.getMessageOrBuilder();
} else {
return weightedStringStats_ == null ?
org.tensorflow.metadata.v0.WeightedStringStatistics.getDefaultInstance() : weightedStringStats_;
}
}
/**
*
* Weighted statistics for the feature, if the values have weights.
*
*
* .tensorflow.metadata.v0.WeightedStringStatistics weighted_string_stats = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.WeightedStringStatistics, org.tensorflow.metadata.v0.WeightedStringStatistics.Builder, org.tensorflow.metadata.v0.WeightedStringStatisticsOrBuilder>
getWeightedStringStatsFieldBuilder() {
if (weightedStringStatsBuilder_ == null) {
weightedStringStatsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.WeightedStringStatistics, org.tensorflow.metadata.v0.WeightedStringStatistics.Builder, org.tensorflow.metadata.v0.WeightedStringStatisticsOrBuilder>(
getWeightedStringStats(),
getParentForChildren(),
isClean());
weightedStringStats_ = null;
}
return weightedStringStatsBuilder_;
}
private java.lang.Object vocabularyFile_ = "";
/**
*
* A vocabulary file, used for vocabularies too large to store in the proto
* itself. Note that the file may be relative to some context-dependent
* directory. E.g. in TFX the feature statistics will live in a PPP and
* vocabulary file names will be relative to this PPP.
*
*
* string vocabulary_file = 7;
* @return The vocabularyFile.
*/
public java.lang.String getVocabularyFile() {
java.lang.Object ref = vocabularyFile_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
vocabularyFile_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* A vocabulary file, used for vocabularies too large to store in the proto
* itself. Note that the file may be relative to some context-dependent
* directory. E.g. in TFX the feature statistics will live in a PPP and
* vocabulary file names will be relative to this PPP.
*
*
* string vocabulary_file = 7;
* @return The bytes for vocabularyFile.
*/
public com.google.protobuf.ByteString
getVocabularyFileBytes() {
java.lang.Object ref = vocabularyFile_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
vocabularyFile_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* A vocabulary file, used for vocabularies too large to store in the proto
* itself. Note that the file may be relative to some context-dependent
* directory. E.g. in TFX the feature statistics will live in a PPP and
* vocabulary file names will be relative to this PPP.
*
*
* string vocabulary_file = 7;
* @param value The vocabularyFile to set.
* @return This builder for chaining.
*/
public Builder setVocabularyFile(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
vocabularyFile_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* A vocabulary file, used for vocabularies too large to store in the proto
* itself. Note that the file may be relative to some context-dependent
* directory. E.g. in TFX the feature statistics will live in a PPP and
* vocabulary file names will be relative to this PPP.
*
*
* string vocabulary_file = 7;
* @return This builder for chaining.
*/
public Builder clearVocabularyFile() {
vocabularyFile_ = getDefaultInstance().getVocabularyFile();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
return this;
}
/**
*
* A vocabulary file, used for vocabularies too large to store in the proto
* itself. Note that the file may be relative to some context-dependent
* directory. E.g. in TFX the feature statistics will live in a PPP and
* vocabulary file names will be relative to this PPP.
*
*
* string vocabulary_file = 7;
* @param value The bytes for vocabularyFile to set.
* @return This builder for chaining.
*/
public Builder setVocabularyFileBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
vocabularyFile_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
private long invalidUtf8Count_ ;
/**
*
* Counts the number of invalid utf8 strings present in leaf arrays for this
* feature. Validation is only performed for byte- or string-like features (
* those having type BYTES or STRING).
*
*
* uint64 invalid_utf8_count = 8;
* @return The invalidUtf8Count.
*/
@java.lang.Override
public long getInvalidUtf8Count() {
return invalidUtf8Count_;
}
/**
*
* Counts the number of invalid utf8 strings present in leaf arrays for this
* feature. Validation is only performed for byte- or string-like features (
* those having type BYTES or STRING).
*
*
* uint64 invalid_utf8_count = 8;
* @param value The invalidUtf8Count to set.
* @return This builder for chaining.
*/
public Builder setInvalidUtf8Count(long value) {
invalidUtf8Count_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* Counts the number of invalid utf8 strings present in leaf arrays for this
* feature. Validation is only performed for byte- or string-like features (
* those having type BYTES or STRING).
*
*
* uint64 invalid_utf8_count = 8;
* @return This builder for chaining.
*/
public Builder clearInvalidUtf8Count() {
bitField0_ = (bitField0_ & ~0x00000080);
invalidUtf8Count_ = 0L;
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:tensorflow.metadata.v0.StringStatistics)
}
// @@protoc_insertion_point(class_scope:tensorflow.metadata.v0.StringStatistics)
private static final org.tensorflow.metadata.v0.StringStatistics DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.metadata.v0.StringStatistics();
}
public static org.tensorflow.metadata.v0.StringStatistics getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public StringStatistics 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.StringStatistics getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy