# Keyword

Artifact: [androidx.appsearch:appsearch-builtin-types](https://developer.android.com/jetpack/androidx/releases/appsearch) [View Source](https://cs.android.com/search?q=file:androidx/appsearch/builtintypes/properties/Keyword.java+class:androidx.appsearch.builtintypes.properties.Keyword) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

*** ** * ** ***


```
@Document
public final class Keyword
```

<br />

*** ** * ** ***

Holds a value assignable to <http://schema.org/keywords>.

Contains exactly one of:

- Text i.e. `https://developer.android.com/reference/java/lang/String.html`

Note: More types may be added over time.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/appsearch/builtintypes/properties/Keyword#Keyword(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html asText)` |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/properties/Keyword#asText()()` Returns the Text i.e. `https://developer.android.com/reference/java/lang/String.html` variant, if populated. |
| `boolean` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/properties/Keyword#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object.html o)` |
| `int` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/properties/Keyword#hashCode()()` |

## Public constructors

### Keyword

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
public Keyword(@NonNull String asText)
```

## Public methods

### asText

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
public @Nullable String asText()
```

Returns the Text i.e. `https://developer.android.com/reference/java/lang/String.html` variant, if populated. Otherwise, null.

### equals

```
public boolean equals(Object o)
```

### hashCode

```
public int hashCode()
```