AppSearchSchema.DoublePropertyConfig.Builder
public
static
final
class
AppSearchSchema.DoublePropertyConfig.Builder
extends Object
java.lang.Object | |
↳ | android.app.appsearch.AppSearchSchema.DoublePropertyConfig.Builder |
Builder for DoublePropertyConfig
.
Summary
Public constructors | |
---|---|
Builder(String propertyName)
Creates a new |
Public methods | |
---|---|
AppSearchSchema.DoublePropertyConfig
|
build()
Constructs a new |
AppSearchSchema.DoublePropertyConfig.Builder
|
setCardinality(int cardinality)
Sets the cardinality of the property (whether it is optional, required or repeated). |
AppSearchSchema.DoublePropertyConfig.Builder
|
setScoringEnabled(boolean scoringEnabled)
Sets the property enabled or disabled for scoring. |
Inherited methods | |
---|---|
Public constructors
Builder
public Builder (String propertyName)
Creates a new DoublePropertyConfig.Builder
.
Parameters | |
---|---|
propertyName |
String : This value cannot be null . |
Public methods
build
public AppSearchSchema.DoublePropertyConfig build ()
Constructs a new DoublePropertyConfig
from the contents of this builder.
Returns | |
---|---|
AppSearchSchema.DoublePropertyConfig |
This value cannot be null . |
setCardinality
public AppSearchSchema.DoublePropertyConfig.Builder setCardinality (int cardinality)
Sets 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 : Value is AppSearchSchema.PropertyConfig.CARDINALITY_REPEATED , AppSearchSchema.PropertyConfig.CARDINALITY_OPTIONAL , or AppSearchSchema.PropertyConfig.CARDINALITY_REQUIRED |
Returns | |
---|---|
AppSearchSchema.DoublePropertyConfig.Builder |
This value cannot be null . |
setScoringEnabled
public AppSearchSchema.DoublePropertyConfig.Builder setScoringEnabled (boolean scoringEnabled)
Sets the property enabled or disabled for scoring.
If this method is not called, the default value is false.
If enabled, it can be used in the advanced ranking expression via the function of 'getScorableProperty'.
For the detailed documentation, see SearchSpec.Builder.setRankingStrategy(java.lang.String)
.
Parameters | |
---|---|
scoringEnabled |
boolean |
Returns | |
---|---|
AppSearchSchema.DoublePropertyConfig.Builder |
This value cannot be null . |