# AccessibilityNodeInfoCompat.RangeInfoCompat

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java+class:androidx.core.view.accessibility.AccessibilityNodeInfoCompat.RangeInfoCompat) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

*** ** * ** ***


```
public class AccessibilityNodeInfoCompat.RangeInfoCompat
```

<br />

*** ** * ** ***

Class with information if a node is a range.

## Summary

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#RANGE_TYPE_FLOAT() = 1` Range type: float. |
| `static final int` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#RANGE_TYPE_INT() = 0` Range type: integer. |
| `static final int` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#RANGE_TYPE_PERCENT() = 2` Range type: percent with values from zero to one. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#RangeInfoCompat(int,float,float,float)(int type, float min, float max, float current)` Creates a new range. |

| ### Public methods |
|---|---|
| `float` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#getCurrent()()` Gets the current value. |
| `float` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#getMax()()` Gets the max value. |
| `float` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#getMin()()` Gets the min value. |
| `int` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#getType()()` Gets the range type. |
| `static https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#obtain(int,float,float,float)(int type, float min, float max, float current)` Obtains a cached instance if such is available otherwise a new one. |

## Constants

### RANGE_TYPE_FLOAT

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

```
public static final int RANGE_TYPE_FLOAT = 1
```

Range type: float.

### RANGE_TYPE_INT

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

```
public static final int RANGE_TYPE_INT = 0
```

Range type: integer.

### RANGE_TYPE_PERCENT

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

```
public static final int RANGE_TYPE_PERCENT = 2
```

Range type: percent with values from zero to one.

## Public constructors

### RangeInfoCompat

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

```
public RangeInfoCompat(int type, float min, float max, float current)
```

Creates a new range.

| Parameters |
|---|---|
| `int type` | The type of the range. |
| `float min` | The minimum value. Use `Float.NEGATIVE_INFINITY` if the range has no minimum. |
| `float max` | The maximum value. Use `Float.POSITIVE_INFINITY` if the range has no maximum. |
| `float current` | The current value. |

## Public methods

### getCurrent

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

```
public float getCurrent()
```

Gets the current value.

| Returns |
|---|---|
| `float` | The current value. |

### getMax

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

```
public float getMax()
```

Gets the max value.

| Returns |
|---|---|
| `float` | The max value. |

### getMin

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

```
public float getMin()
```

Gets the min value.

| Returns |
|---|---|
| `float` | The min value. |

### getType

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

```
public int getType()
```

Gets the range type.

| Returns |
|---|---|
| `int` | The range type. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#RANGE_TYPE_INT()` |   |
| `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#RANGE_TYPE_FLOAT()` |   |
| `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#RANGE_TYPE_PERCENT()` |   |

### obtain

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

```
public static AccessibilityNodeInfoCompat.RangeInfoCompat obtain(int type, float min, float max, float current)
```

Obtains a cached instance if such is available otherwise a new one.

| Parameters |
|---|---|
| `int type` | The type of the range. |
| `float min` | The min value. |
| `float max` | The max value. |
| `float current` | The current value. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat` | The instance |