# GPUQuerySet

Artifact: [androidx.webgpu:webgpu](https://developer.android.com/jetpack/androidx/releases/webgpu) [View Source](https://cs.android.com/search?q=file:androidx/webgpu/GPUQuerySet.kt+class:androidx.webgpu.GPUQuerySet) Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

*** ** * ** ***


```
public final class GPUQuerySet implements AutoCloseable
```

<br />

*** ** * ** ***

A set of queries for occlusion or timestamp measurements.

## Summary

| ### Public methods |
|---|---|
| `external void` | `https://developer.android.com/reference/androidx/webgpu/GPUQuerySet#close()()` Decrements the reference count of the object and frees resources when the count reaches zero. |
| `final int` | `https://developer.android.com/reference/androidx/webgpu/GPUQuerySet#count()()` |
| `final external void` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUQuerySet#destroy()()` Destroys the query set and releases its resources. |
| `boolean` | `https://developer.android.com/reference/androidx/webgpu/GPUQuerySet#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final external int` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUQuerySet#getCount()()` Gets the number of queries in the set. |
| `final long` | `https://developer.android.com/reference/androidx/webgpu/GPUQuerySet#getHandle()()` |
| `final external int` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUQuerySet#getType()()` Gets the type of queries in the set. |
| `int` | `https://developer.android.com/reference/androidx/webgpu/GPUQuerySet#hashCode()()` |
| `final external void` | `@https://developer.android.com/reference/dalvik/annotation/optimization/FastNative.html https://developer.android.com/reference/androidx/webgpu/GPUQuerySet#setLabel(kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html label)` Sets a human-readable label for debugging. |
| `final int` | `https://developer.android.com/reference/androidx/webgpu/GPUQuerySet#type()()` |

## Public methods

### close

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
public external void close()
```

Decrements the reference count of the object and frees resources when the count reaches zero.

This is the standard way to manage object lifetimes and should be used in `use` blocks. After calling this, the object is no longer usable.

### count

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
public final int count()
```

### destroy

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
@FastNative
public final external void destroy()
```

Destroys the query set and releases its resources.

### equals

```
public boolean equals(Object other)
```

### getCount

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
@FastNative
public final external int getCount()
```

Gets the number of queries in the set.

| Returns |
|---|---|
| `int` | The query count. |

### getHandle

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
public final long getHandle()
```

### getType

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
@FastNative
public final external int getType()
```

Gets the type of queries in the set.

Value is one of the following:

- `1`
- `2`

<br />

| Returns |
|---|---|
| `int` | The query type. |

### hashCode

```
public int hashCode()
```

### setLabel

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
@FastNative
public final external void setLabel(@NonNull String label)
```

Sets a human-readable label for debugging.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html label` | The label string. |

### type

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
public final int type()
```