# ImmutableStrokeInputBatch

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

*** ** * ** ***

Common/All
- Cmn

  ```
  class ImmutableStrokeInputBatch : StrokeInputBatch
  ```

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.ink.strokes.StrokeInputBatch](https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInputBatch) ||
|   | ↳ | [androidx.ink.strokes.ImmutableStrokeInputBatch](https://developer.android.com/reference/kotlin/androidx/ink/strokes/ImmutableStrokeInputBatch) |

*** ** * ** ***

An immutable implementation of `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInputBatch`. For a mutable alternative, see `https://developer.android.com/reference/kotlin/androidx/ink/strokes/MutableStrokeInputBatch`.

## Summary

| ### Public companion properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/strokes/ImmutableStrokeInputBatch` | `https://developer.android.com/reference/kotlin/androidx/ink/strokes/ImmutableStrokeInputBatch#EMPTY()` An empty `https://developer.android.com/reference/kotlin/androidx/ink/strokes/ImmutableStrokeInputBatch`. | Cmn |

| ### Public functions |
|---|---|---|
| `open https://developer.android.com/reference/kotlin/androidx/ink/strokes/ImmutableStrokeInputBatch` | `https://developer.android.com/reference/kotlin/androidx/ink/strokes/ImmutableStrokeInputBatch#toImmutable()()` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/strokes/ImmutableStrokeInputBatch#toString()()` | Cmn |

### Inherited functions

From [androidx.ink.strokes.StrokeInputBatch](https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInputBatch) `operator https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInput` `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInputBatch#get(kotlin.Int)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Gets the value of the i-th input.
Cmn `@https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0, toInclusive = false) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInputBatch#getBasePaintAnimationPhase()()`

Returns the \[0, 1) value that will determine the stroke's overall paint animation progress at some arbitrary zero clock state, so that different strokes can be animated correctly relative to each other.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInputBatch#getDurationMillis()()`

The duration between the first and last input in milliseconds.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInputBatch#getNoiseSeed()()`

Returns the seed value that should be used for seeding any noise generators for brush behaviors when a full stroke is regenerated with this input batch.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInputBatch#getStrokeUnitLengthCm()()`

The physical distance in centimeters that the pointer must travel in order to produce an input motion of one stroke unit.
Cmn `https://developer.android.com/reference/kotlin/androidx/ink/brush/InputToolType` `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInputBatch#getToolType()()`

How this input stream should be interpreted, as coming from a `https://developer.android.com/reference/kotlin/androidx/ink/brush/InputToolType#MOUSE()`, `https://developer.android.com/reference/kotlin/androidx/ink/brush/InputToolType#TOUCH()`, or `https://developer.android.com/reference/kotlin/androidx/ink/brush/InputToolType#STYLUS()`.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInputBatch#hasOrientation()()`

Whether all of the individual inputs have a defined value for `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInput#orientationRadians()`.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInputBatch#hasPressure()()`

Whether all of the individual inputs have a defined value for `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInput#pressure()`.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInputBatch#hasStrokeUnitLength()()`

Whether `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInput#strokeUnitLengthCm()` has a valid value, which is something other than `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInput#NO_STROKE_UNIT_LENGTH()`.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInputBatch#hasTilt()()`

Whether all of the individual inputs have a defined value for `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInput#tiltRadians()`.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInputBatch#isEmpty()()`

`true` if there are no `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInput` objects in the batch, and `false` otherwise.
Cmn `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInput` `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInputBatch#populate(kotlin.Int,androidx.ink.strokes.StrokeInput)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, outStrokeInput: https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInput)`

Gets the value of the i-th input and overwrites `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInputBatch#populate(kotlin.Int,androidx.ink.strokes.StrokeInput)`, which it then returns.
Cmn

### Inherited properties

From [androidx.ink.strokes.StrokeInputBatch](https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInputBatch) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInputBatch#size()`

Number of `https://developer.android.com/reference/kotlin/androidx/ink/strokes/StrokeInput` objects in the batch.
Cmn

## Public companion properties

### EMPTY

Cmn

```
val EMPTY: ImmutableStrokeInputBatch
```

An empty `https://developer.android.com/reference/kotlin/androidx/ink/strokes/ImmutableStrokeInputBatch`.

## Public functions

### toImmutable

Cmn

```
open fun toImmutable(): ImmutableStrokeInputBatch
```

### toString

Cmn

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