Class BloomFilter.Builder (3.13.2)

public static final class BloomFilter.Builder extends GeneratedMessageV3.Builder<BloomFilter.Builder> implements BloomFilterOrBuilder

A bloom filter (https://en.wikipedia.org/wiki/Bloom_filter). The bloom filter hashes the entries with MD5 and treats the resulting 128-bit hash as 2 distinct 64-bit hash values, interpreted as unsigned integers using 2's complement encoding. These two hash values, named h1 and h2, are then used to compute the hash_count hash values using the formula, starting at i=0: h(i) = h1 + (i * h2) These resulting values are then taken modulo the number of bits in the bloom filter to get the bits of the bloom filter to test for the given entry.

Protobuf type google.firestore.v1.BloomFilter

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public BloomFilter.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
BloomFilter.Builder
Overrides

build()

public BloomFilter build()
Returns
TypeDescription
BloomFilter

buildPartial()

public BloomFilter buildPartial()
Returns
TypeDescription
BloomFilter

clear()

public BloomFilter.Builder clear()
Returns
TypeDescription
BloomFilter.Builder
Overrides

clearBits()

public BloomFilter.Builder clearBits()

The bloom filter data.

.google.firestore.v1.BitSequence bits = 1;

Returns
TypeDescription
BloomFilter.Builder

clearField(Descriptors.FieldDescriptor field)

public BloomFilter.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
BloomFilter.Builder
Overrides

clearHashCount()

public BloomFilter.Builder clearHashCount()

The number of hashes used by the algorithm.

int32 hash_count = 2;

Returns
TypeDescription
BloomFilter.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public BloomFilter.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
BloomFilter.Builder
Overrides

clone()

public BloomFilter.Builder clone()
Returns
TypeDescription
BloomFilter.Builder
Overrides

getBits()

public BitSequence getBits()

The bloom filter data.

.google.firestore.v1.BitSequence bits = 1;

Returns
TypeDescription
BitSequence

The bits.

getBitsBuilder()

public BitSequence.Builder getBitsBuilder()

The bloom filter data.

.google.firestore.v1.BitSequence bits = 1;

Returns
TypeDescription
BitSequence.Builder

getBitsOrBuilder()

public BitSequenceOrBuilder getBitsOrBuilder()

The bloom filter data.

.google.firestore.v1.BitSequence bits = 1;

Returns
TypeDescription
BitSequenceOrBuilder

getDefaultInstanceForType()

public BloomFilter getDefaultInstanceForType()
Returns
TypeDescription
BloomFilter

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getHashCount()

public int getHashCount()

The number of hashes used by the algorithm.

int32 hash_count = 2;

Returns
TypeDescription
int

The hashCount.

hasBits()

public boolean hasBits()

The bloom filter data.

.google.firestore.v1.BitSequence bits = 1;

Returns
TypeDescription
boolean

Whether the bits field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeBits(BitSequence value)

public BloomFilter.Builder mergeBits(BitSequence value)

The bloom filter data.

.google.firestore.v1.BitSequence bits = 1;

Parameter
NameDescription
valueBitSequence
Returns
TypeDescription
BloomFilter.Builder

mergeFrom(BloomFilter other)

public BloomFilter.Builder mergeFrom(BloomFilter other)
Parameter
NameDescription
otherBloomFilter
Returns
TypeDescription
BloomFilter.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public BloomFilter.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BloomFilter.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public BloomFilter.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
BloomFilter.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final BloomFilter.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
BloomFilter.Builder
Overrides

setBits(BitSequence value)

public BloomFilter.Builder setBits(BitSequence value)

The bloom filter data.

.google.firestore.v1.BitSequence bits = 1;

Parameter
NameDescription
valueBitSequence
Returns
TypeDescription
BloomFilter.Builder

setBits(BitSequence.Builder builderForValue)

public BloomFilter.Builder setBits(BitSequence.Builder builderForValue)

The bloom filter data.

.google.firestore.v1.BitSequence bits = 1;

Parameter
NameDescription
builderForValueBitSequence.Builder
Returns
TypeDescription
BloomFilter.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public BloomFilter.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
BloomFilter.Builder
Overrides

setHashCount(int value)

public BloomFilter.Builder setHashCount(int value)

The number of hashes used by the algorithm.

int32 hash_count = 2;

Parameter
NameDescription
valueint

The hashCount to set.

Returns
TypeDescription
BloomFilter.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public BloomFilter.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
BloomFilter.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final BloomFilter.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
BloomFilter.Builder
Overrides