# NavigationEventHistory

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

*** ** * ** ***

Common/AllAndroid/JVMJavaScript
- Cmn

  ```
  class NavigationEventHistory
  ```

*** ** * ** ***

Represents an immutable snapshot of the navigation history stack.

This object tracks the combined navigation stack (`https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHistory#mergedHistory()`) from the root to the currently active destination, indicated by `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHistory#(androidx.navigationevent.NavigationEventInfo,kotlin.collections.List,kotlin.collections.List,kotlin.Int)`.

This state is explicitly separate from transition state (which tracks gesture progress). `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHistory` is stable during gestures and only updates when the active handler changes or when the active handler's info (its local stack) is updated.

## Summary

| ### Public functions |
|---|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHistory#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHistory#hashCode()()` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHistory#toString()()` | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHistory#currentIndex()` Index of current in mergedHistory. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInfo>` | `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHistory#mergedHistory()` Combined stack from root to leaf. | Cmn |

## Public functions

### equals

Cmn

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

### hashCode

Cmn

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

### toString

Cmn

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

## Public properties

### currentIndex

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
val currentIndex: Int
```

Index of current in mergedHistory.

### mergedHistory

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
val mergedHistory: List<NavigationEventInfo>
```

Combined stack from root to leaf.