# StorageDomain.ExcludedData

Artifact: [androidx.test.backup:backup-host](https://developer.android.com/jetpack/androidx/releases/test-backup) [View Source](https://cs.android.com/search?q=file:androidx/test/backup/host/StorageDomain.kt+class:androidx.test.backup.host.StorageDomain.ExcludedData) Added in [1.0.0-alpha04](https://developer.android.com/jetpack/androidx/releases/test-backup#1.0.0-alpha04)

*** ** * ** ***


```
public final class StorageDomain.ExcludedData extends StorageDomain
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.test.backup.host.StorageDomain](https://developer.android.com/reference/androidx/test/backup/host/StorageDomain) ||
|   | ↳ | [androidx.test.backup.host.StorageDomain.ExcludedData](https://developer.android.com/reference/androidx/test/backup/host/StorageDomain.ExcludedData) |

*** ** * ** ***

Targets data that the restore doesn't bring back, such as data that the app's backup rules exclude.

The flow seeds `https://developer.android.com/reference/androidx/test/backup/host/StorageDomain.ExcludedData#domain()` before the backup, and verifies after the restore that the preference key, the database row with the primary key value, or the file is absent. A flow needs a restored domain as well, to verify that the restore happened: a flow with only excluded data fails with an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/test/backup/host/StorageDomain.ExcludedData#ExcludedData(androidx.test.backup.host.StorageDomain)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/test/backup/host/StorageDomain domain)` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/test/backup/host/StorageDomain.ExcludedData#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/test/backup/host/StorageDomain` | `https://developer.android.com/reference/androidx/test/backup/host/StorageDomain.ExcludedData#getDomain()()` data to seed and then expect absent: a `https://developer.android.com/reference/androidx/test/backup/host/StorageDomain.Preference` or `https://developer.android.com/reference/androidx/test/backup/host/StorageDomain.DataStorePreference` with a value, a `https://developer.android.com/reference/androidx/test/backup/host/StorageDomain.Database`, a `https://developer.android.com/reference/androidx/test/backup/host/StorageDomain.TextFile` or a `https://developer.android.com/reference/androidx/test/backup/host/StorageDomain.BinaryFile`. |
| `int` | `https://developer.android.com/reference/androidx/test/backup/host/StorageDomain.ExcludedData#hashCode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/test/backup/host/StorageDomain.ExcludedData#toString()()` |

## Public constructors

### ExcludedData

Added in [1.0.0-alpha04](https://developer.android.com/jetpack/androidx/releases/test-backup#1.0.0-alpha04)

```
public ExcludedData(@NonNull StorageDomain domain)
```

## Public methods

### equals

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

### getDomain

Added in [1.0.0-alpha04](https://developer.android.com/jetpack/androidx/releases/test-backup#1.0.0-alpha04)

```
public final @NonNull StorageDomain getDomain()
```

data to seed and then expect absent: a `https://developer.android.com/reference/androidx/test/backup/host/StorageDomain.Preference` or `https://developer.android.com/reference/androidx/test/backup/host/StorageDomain.DataStorePreference` with a value, a `https://developer.android.com/reference/androidx/test/backup/host/StorageDomain.Database`, a `https://developer.android.com/reference/androidx/test/backup/host/StorageDomain.TextFile` or a `https://developer.android.com/reference/androidx/test/backup/host/StorageDomain.BinaryFile`. Any other domain fails construction with an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html`.

### hashCode

```
public int hashCode()
```

### toString

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