# AccessibilityNodeInfoCompat.RangeInfoCompat

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat "View this page in Java")

<br />

```
class AccessibilityNodeInfoCompat.RangeInfoCompat
```

<br />

*** ** * ** ***

Class with information if a node is a range.

## Summary

|                                    ### Constants                                    |
|-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [RANGE_TYPE_FLOAT](https://developer.android.com/reference/kotlin/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#RANGE_TYPE_FLOAT())` = 1` Range type: float.                                    |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [RANGE_TYPE_INT](https://developer.android.com/reference/kotlin/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#RANGE_TYPE_INT())` = 0` Range type: integer.                                      |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [RANGE_TYPE_PERCENT](https://developer.android.com/reference/kotlin/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#RANGE_TYPE_PERCENT())` = 2` Range type: percent with values from zero to one. |

|                                                                                                                                                                                                                                                                            ### Public constructors                                                                                                                                                                                                                                                                            |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [RangeInfoCompat](https://developer.android.com/reference/kotlin/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#RangeInfoCompat(int,float,float,float))`(type: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, min: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)`, max: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)`, current: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)`)` Creates a new range. |

|                                                                                    ### Public functions                                                                                     |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)                                                                                                             | [getCurrent](https://developer.android.com/reference/kotlin/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#getCurrent())`()` Gets the current value.                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)                                                                                                             | [getMax](https://developer.android.com/reference/kotlin/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#getMax())`()` Gets the max value.                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)                                                                                                             | [getMin](https://developer.android.com/reference/kotlin/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#getMin())`()` Gets the min value.                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                                                 | [getType](https://developer.android.com/reference/kotlin/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#getType())`()` Gets the range type.                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `java-static `[AccessibilityNodeInfoCompat.RangeInfoCompat](https://developer.android.com/reference/kotlin/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat)`!` | [obtain](https://developer.android.com/reference/kotlin/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#obtain(int,float,float,float))`(type: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, min: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)`, max: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)`, current: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)`)` 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)  

```
const val RANGE_TYPE_FLOAT = 1: Int
```

Range type: float.  

### RANGE_TYPE_INT

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

```
const val RANGE_TYPE_INT = 0: Int
```

Range type: integer.  

### RANGE_TYPE_PERCENT

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

```
const val RANGE_TYPE_PERCENT = 2: Int
```

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)  

```
RangeInfoCompat(type: Int, min: Float, max: Float, current: Float)
```

Creates a new range.  

|                                         Parameters                                         |
|--------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------|
| `type: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)        | The type of the range.                                                      |
| `min: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)     | The minimum value. Use`Float.NEGATIVE_INFINITY`if the range has no minimum. |
| `max: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)     | The maximum value. Use`Float.POSITIVE_INFINITY`if the range has no maximum. |
| `current: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | The current value.                                                          |

## Public functions

### getCurrent

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

```
fun getCurrent(): Float
```

Gets the current value.  

|                                     Returns                                     |
|---------------------------------------------------------------------------------|--------------------|
| [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | The current value. |

### getMax

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

```
fun getMax(): Float
```

Gets the max value.  

|                                     Returns                                     |
|---------------------------------------------------------------------------------|----------------|
| [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | The max value. |

### getMin

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

```
fun getMin(): Float
```

Gets the min value.  

|                                     Returns                                     |
|---------------------------------------------------------------------------------|----------------|
| [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | The min value. |

### getType

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

```
fun getType(): Int
```

Gets the range type.  

|                                   Returns                                   |
|-----------------------------------------------------------------------------|-----------------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | The range type. |

|                                                                                See also                                                                                |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [RANGE_TYPE_INT](https://developer.android.com/reference/kotlin/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#RANGE_TYPE_INT())         |   |
| [RANGE_TYPE_FLOAT](https://developer.android.com/reference/kotlin/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat#RANGE_TYPE_FLOAT())     |   |
| [RANGE_TYPE_PERCENT](https://developer.android.com/reference/kotlin/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)  

```
java-static fun obtain(type: Int, min: Float, max: Float, current: Float): AccessibilityNodeInfoCompat.RangeInfoCompat!
```

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

|                                         Parameters                                         |
|--------------------------------------------------------------------------------------------|------------------------|
| `type: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)        | The type of the range. |
| `min: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)     | The min value.         |
| `max: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)     | The max value.         |
| `current: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | The current value.     |

|                                                                                    Returns                                                                                    |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|
| [AccessibilityNodeInfoCompat.RangeInfoCompat](https://developer.android.com/reference/kotlin/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.RangeInfoCompat)`!` | The instance |