# AttributeEntry

Artifact: [androidx.tracing:tracing](https://developer.android.com/jetpack/androidx/releases/tracing) [View Source](https://cs.android.com/search?q=file:androidx/tracing/AttributeEntry.kt+class:androidx.tracing.AttributeEntry) Added in [2.0.5](https://developer.android.com/jetpack/androidx/releases/tracing#2.0.5)

*** ** * ** ***

Android/JVM
- android

  ```
  @DelicateTracingApi
  class AttributeEntry
  ```

*** ** * ** ***

`https://developer.android.com/reference/kotlin/androidx/tracing/TraceEvent`s can contain trace attributes that apply to the entire trace. This is how that metadata is sent to the `https://developer.android.com/reference/kotlin/androidx/tracing/AbstractTraceSink`. These objects are pooled, and we expose bare-fields because this is performance sensitive code.

End users of tracing will never use this class directly. They will only interact with it using `https://developer.android.com/reference/kotlin/androidx/tracing/TraceEventScope`.

An `https://developer.android.com/reference/kotlin/androidx/tracing/AttributeEntry` should only have one of `https://developer.android.com/reference/kotlin/androidx/tracing/AttributeEntry#longValue()`, or `https://developer.android.com/reference/kotlin/androidx/tracing/AttributeEntry#stringValue()` non-null when set. There can **never** be more than one value set.

## Summary

| ### Public functions |
|---|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/tracing/AttributeEntry#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/tracing/AttributeEntry#hashCode()()` | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/tracing/AttributeEntry#reset()()` Resets the fields of the `https://developer.android.com/reference/kotlin/androidx/tracing/AttributeEntry`. | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/tracing/AttributeEntry#toString()()` | android |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html?` | `https://developer.android.com/reference/kotlin/androidx/tracing/AttributeEntry#longValue()` | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/tracing/AttributeEntry#name()` | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/tracing/AttributeEntry#stringValue()` | android |

## Public functions

### equals

android

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

android

```
open fun hashCode(): Int
```

### reset

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

```
fun reset(): Unit
```

Resets the fields of the `https://developer.android.com/reference/kotlin/androidx/tracing/AttributeEntry`. This is done before reusing the object instance in a pool. `https://developer.android.com/reference/kotlin/androidx/tracing/AbstractTraceSink` authors are not expected to call this method directly; this is automatically done when calling `https://developer.android.com/reference/kotlin/androidx/tracing/PooledTracePacketArray#recycle()` once the `https://developer.android.com/reference/kotlin/androidx/tracing/TraceEvent` is serialized.

### toString

android

```
open fun toString(): String
```

## Public properties

### longValue

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

```
var longValue: Long?
```

### name

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

```
var name: String?
```

### stringValue

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

```
var stringValue: String?
```