AppSearchSchema.PropertyConfig

public static abstract class AppSearchSchema.PropertyConfig
extends Object

java.lang.Object
   ↳ androidx.appsearch.app.AppSearchSchema.PropertyConfig


Common configuration for a single property (field) in a Document.

For example, an EmailMessage would be a type and the subject would be a property.

Summary

Constants

int CARDINALITY_OPTIONAL

Zero or one value [0,1].

int CARDINALITY_REPEATED

Any number of items (including zero) [0...*].

int CARDINALITY_REQUIRED

Exactly one value [1].

Public methods

boolean equals(Object other)
int getCardinality()

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

String getName()

Returns the name of this property.

int hashCode()
String toString()

Inherited methods

Constants

CARDINALITY_OPTIONAL

public static final int CARDINALITY_OPTIONAL

Zero or one value [0,1].

Constant Value: 2 (0x00000002)

CARDINALITY_REPEATED

public static final int CARDINALITY_REPEATED

Any number of items (including zero) [0...*].

Constant Value: 1 (0x00000001)

CARDINALITY_REQUIRED

public static final int CARDINALITY_REQUIRED

Exactly one value [1].

Constant Value: 3 (0x00000003)

Public methods

equals

public boolean equals (Object other)

Parameters
other Object

Returns
boolean

getCardinality

public int getCardinality ()

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

Returns
int

getName

public String getName ()

Returns the name of this property.

Returns
String

hashCode

public int hashCode ()

Returns
int

toString

public String toString ()

Returns
String