# PropertyDefinedNode

Artifact: [androidx.appsearch:appsearch](https://developer.android.com/jetpack/androidx/releases/appsearch) [View Source](https://cs.android.com/search?q=file:androidx/appsearch/ast/query/PropertyDefinedNode.java+class:androidx.appsearch.ast.query.PropertyDefinedNode) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

*** ** * ** ***


```
@ExperimentalAppSearchApi
public final class PropertyDefinedNode implements FunctionNode
```

<br />

*** ** * ** ***

`https://developer.android.com/reference/androidx/appsearch/ast/FunctionNode` representing the \`propertyDefined\` query function.

The \`propertyDefined\` query function will return all documents of types that define the given property. This will include documents that do not have the property itself, so long as that property is a part of the document's schema.

If you need to restrict to documents that have \>=1 value(s) populated for that property, see `https://developer.android.com/reference/androidx/appsearch/ast/query/HasPropertyNode`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/appsearch/ast/query/PropertyDefinedNode#PropertyDefinedNode(androidx.appsearch.app.PropertyPath)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/appsearch/app/PropertyPath propertyPath)` Constructor for a `https://developer.android.com/reference/androidx/appsearch/ast/query/PropertyDefinedNode` representing the query function \`propertyDefined\` that takes in a `https://developer.android.com/reference/androidx/appsearch/app/PropertyPath`. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/appsearch/ast/query/PropertyDefinedNode#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object.html o)` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/appsearch/ast/query/PropertyDefinedNode#getFunctionName()()` Returns the name of the function represented by `https://developer.android.com/reference/androidx/appsearch/ast/query/PropertyDefinedNode`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/appsearch/app/PropertyPath` | `https://developer.android.com/reference/androidx/appsearch/ast/query/PropertyDefinedNode#getPropertyPath()()` Returns the `https://developer.android.com/reference/androidx/appsearch/app/PropertyPath` representing the property being checked for in the document. |
| `int` | `https://developer.android.com/reference/androidx/appsearch/ast/query/PropertyDefinedNode#hashCode()()` |
| `void` | `https://developer.android.com/reference/androidx/appsearch/ast/query/PropertyDefinedNode#setPropertyPath(androidx.appsearch.app.PropertyPath)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/appsearch/app/PropertyPath property)` Sets the property being checked for in the document, as represented by `https://developer.android.com/reference/androidx/appsearch/ast/query/PropertyDefinedNode`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/appsearch/ast/query/PropertyDefinedNode#toString()()` Get the string representation of `https://developer.android.com/reference/androidx/appsearch/ast/query/PropertyDefinedNode`. |

| ### Inherited Constants |
|---|
| From [androidx.appsearch.ast.FunctionNode](https://developer.android.com/reference/androidx/appsearch/ast/FunctionNode) |---|---| | `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/appsearch/ast/FunctionNode#FUNCTION_NAME_GET_SEARCH_STRING_PARAMETER() = "getSearchStringParameter"` Name of the query function represented by `https://developer.android.com/reference/androidx/appsearch/ast/query/GetSearchStringParameterNode`. | | `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/appsearch/ast/FunctionNode#FUNCTION_NAME_HAS_PROPERTY() = "hasProperty"` Name of the query function represented by `https://developer.android.com/reference/androidx/appsearch/ast/query/HasPropertyNode`. | | `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/appsearch/ast/FunctionNode#FUNCTION_NAME_PROPERTY_DEFINED() = "propertyDefined"` Name of the query function represented by `https://developer.android.com/reference/androidx/appsearch/ast/query/PropertyDefinedNode`. | | `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/appsearch/ast/FunctionNode#FUNCTION_NAME_SEARCH() = "search"` Name of the query function represented by `https://developer.android.com/reference/androidx/appsearch/ast/query/SearchNode`. | | `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/appsearch/ast/FunctionNode#FUNCTION_NAME_SEMANTIC_SEARCH() = "semanticSearch"` Name of the query function represented by `https://developer.android.com/reference/androidx/appsearch/ast/query/SemanticSearchNode`. | |

| ### Inherited methods |
|---|
| From [androidx.appsearch.ast.Node](https://developer.android.com/reference/androidx/appsearch/ast/Node) |---|---| | `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/appsearch/ast/Node>` | `https://developer.android.com/reference/androidx/appsearch/ast/Node#getChildren()()` Get a list of the node's child `https://developer.android.com/reference/androidx/appsearch/ast/Node`s. | |

## Public constructors

### PropertyDefinedNode

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

```
public PropertyDefinedNode(@NonNull PropertyPath propertyPath)
```

Constructor for a `https://developer.android.com/reference/androidx/appsearch/ast/query/PropertyDefinedNode` representing the query function \`propertyDefined\` that takes in a `https://developer.android.com/reference/androidx/appsearch/app/PropertyPath`.

## Public methods

### equals

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

### getFunctionName

```
public @NonNull String getFunctionName()
```

Returns the name of the function represented by `https://developer.android.com/reference/androidx/appsearch/ast/query/PropertyDefinedNode`.

### getPropertyPath

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

```
public @NonNull PropertyPath getPropertyPath()
```

Returns the `https://developer.android.com/reference/androidx/appsearch/app/PropertyPath` representing the property being checked for in the document.

### hashCode

```
public int hashCode()
```

### setPropertyPath

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

```
public void setPropertyPath(@NonNull PropertyPath property)
```

Sets the property being checked for in the document, as represented by `https://developer.android.com/reference/androidx/appsearch/ast/query/PropertyDefinedNode`.

### toString

```
public @NonNull String toString()
```

Get the string representation of `https://developer.android.com/reference/androidx/appsearch/ast/query/PropertyDefinedNode`.

The string representation of `https://developer.android.com/reference/androidx/appsearch/ast/query/PropertyDefinedNode` is the function name followed by the property path in quotes surrounded by parentheses.