Package org.apache.sling.feature.extension.apiregions.api.config

# Class Range

java.lang.Object
org.apache.sling.feature.extension.apiregions.api.config.AttributeableEntity
org.apache.sling.feature.extension.apiregions.api.config.Range

public class Range extends AttributeableEntity
A numerical value range This class is not thread safe.

## Constructor Summary

Constructors
Constructor
Description
`Range()`

## Method Summary

Modifier and Type
Method
Description
`void`
`clear()`
Clear the object and reset to defaults
`protected jakarta.json.JsonObjectBuilder`
`createJson()`
Convert this object into JSON
`void`
`fromJSONObject(jakarta.json.JsonObject jsonObj)`
Extract the metadata from the JSON object.
`Number`
`getMax()`
Get the max value
`Number`
`getMin()`
Get the min value
`void`
`setMax(Number max)`
Set the max value
`void`
`setMin(Number min)`
Set the min value
`String`
`toString()`

### Methods inherited from class org.apache.sling.feature.extension.apiregions.api.config.AttributeableEntity

`getAttributes, getBoolean, getInteger, getNumber, getString, getString, getStringArray, setDefaults, setString, setStringArray, toJSONObject`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### Range

public Range()

## Method Details

### clear

public void clear()
Clear the object and reset to defaults

Overrides:
  `clear` in class `AttributeableEntity`

### fromJSONObject

public void fromJSONObject(jakarta.json.JsonObject jsonObj) throws IOException
Extract the metadata from the JSON object. This method first calls `clear()`

Overrides:
  `fromJSONObject` in class `AttributeableEntity`
Parameters:
  `jsonObj` - The JSON Object
Throws:
  `IOException` - If JSON parsing fails

### getMin

public Number getMin()
Get the min value

Returns:
  the min or `null`

### setMin

public void setMin(Number min)
Set the min value

Parameters:
  `min` - the min to set

### getMax

public Number getMax()
Get the max value

Returns:
  the max or `null`

### setMax

public void setMax(Number max)
Set the max value

Parameters:
  `max` - the max to set

### createJson

protected jakarta.json.JsonObjectBuilder createJson() throws IOException
Convert this object into JSON

Overrides:
  `createJson` in class `AttributeableEntity`
Returns:
  The json object builder
Throws:
  `IOException` - If generating the JSON fails

### toString

public String toString()

Overrides:
  `toString` in class `Object`