AppSearchSchema.DoublePropertyConfig.Builder

public static final class AppSearchSchema.DoublePropertyConfig.Builder
extends Object

java.lang.Object
   ↳ androidx.appsearch.app.AppSearchSchema.DoublePropertyConfig.Builder


Builder for AppSearchSchema.DoublePropertyConfig.

Summary

Public constructors

Builder(String propertyName)

Creates a new AppSearchSchema.DoublePropertyConfig.Builder.

Public methods

AppSearchSchema.DoublePropertyConfig build()

Constructs a new AppSearchSchema.DoublePropertyConfig from the contents of this builder.

AppSearchSchema.DoublePropertyConfig.Builder setCardinality(int cardinality)

The cardinality of the property (whether it is optional, required or repeated).

Inherited methods

Public constructors

Builder

public Builder (String propertyName)

Creates a new AppSearchSchema.DoublePropertyConfig.Builder.

Parameters
propertyName String

Public methods

build

public AppSearchSchema.DoublePropertyConfig build ()

Constructs a new AppSearchSchema.DoublePropertyConfig from the contents of this builder.

After calling this method, the builder must no longer be used.

Returns
AppSearchSchema.DoublePropertyConfig

Throws
IllegalStateException if the builder has already been used

setCardinality

public AppSearchSchema.DoublePropertyConfig.Builder setCardinality (int cardinality)

The cardinality of the property (whether it is optional, required or repeated).

If this method is not called, the default cardinality is AppSearchSchema.PropertyConfig.CARDINALITY_OPTIONAL.

Parameters
cardinality int

Returns
AppSearchSchema.DoublePropertyConfig.Builder