# LoadType

Artifact: [androidx.paging:paging-common](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/LoadType.kt+class:androidx.paging.LoadType) Added in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

*** ** * ** ***

Common/AllAndroid/JVMNative/C/iOSJavaScript
- Cmn

  ```
  enum LoadType : Enum<LoadType>
  ```

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [kotlin.Enum](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-enum/index.html)\<[LoadType](https://developer.android.com/reference/kotlin/androidx/paging/LoadType)\> ||
|   | ↳ | [androidx.paging.LoadType](https://developer.android.com/reference/kotlin/androidx/paging/LoadType) |

*** ** * ** ***

Type of load a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` can trigger a `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` to perform.

`https://developer.android.com/reference/kotlin/androidx/paging/LoadState` of any `https://developer.android.com/reference/kotlin/androidx/paging/LoadType` may be observed for UI purposes by registering a listener via androidx.paging.PagingDataAdapter.addLoadStateListener or androidx.paging.AsyncPagingDataDiffer.addLoadStateListener.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/LoadState` |   |

## Summary

| ### Enum Values |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/LoadType#APPEND` | Load at the end of a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData`. |
| `https://developer.android.com/reference/kotlin/androidx/paging/LoadType#PREPEND` | Load at the start of a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData`. |
| `https://developer.android.com/reference/kotlin/androidx/paging/LoadType#REFRESH` | `https://developer.android.com/reference/kotlin/androidx/paging/PagingData` content being refreshed, which can be a result of `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` invalidation, refresh that may contain content updates, or the initial load. |

| ### Public functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/paging/LoadType` | `https://developer.android.com/reference/kotlin/androidx/paging/LoadType#valueOf(kotlin.String)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Returns the enum constant of this type with the specified name. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/paging/LoadType>` | `https://developer.android.com/reference/kotlin/androidx/paging/LoadType#values()()` Returns an array containing the constants of this enum type, in the order they're declared. | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.enums/-enum-entries/index.html<https://developer.android.com/reference/kotlin/androidx/paging/LoadType>` | `https://developer.android.com/reference/kotlin/androidx/paging/LoadType#entries()` Returns an immutable `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.enums/-enum-entries/index.html` list containing the constants of this enum type, in the order they're declared. | Cmn |

## Enum Values

### APPEND

```
val LoadType.APPEND: LoadType
```

Load at the end of a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData`.

### PREPEND

```
val LoadType.PREPEND: LoadType
```

Load at the start of a `https://developer.android.com/reference/kotlin/androidx/paging/PagingData`.

### REFRESH

```
val LoadType.REFRESH: LoadType
```

`https://developer.android.com/reference/kotlin/androidx/paging/PagingData` content being refreshed, which can be a result of `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` invalidation, refresh that may contain content updates, or the initial load.

## Public functions

### valueOf

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

```
fun valueOf(value: String): LoadType
```

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if this enum type has no constant with the specified name |

### values

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

```
fun values(): Array<LoadType>
```

Returns an array containing the constants of this enum type, in the order they're declared.

This method may be used to iterate over the constants.

The function returns a new instance of the array on every call. The array could be mutated, so working with it may also require defensive copying. Consider using `entries` property as a more efficient alternative returning an immutable list of enum entries.

## Public properties

### entries

Cmn

```
val entries: EnumEntries<LoadType>
```

Returns an immutable `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.enums/-enum-entries/index.html` list containing the constants of this enum type, in the order they're declared.