Class Range
java.lang.Object
org.apache.sling.feature.extension.apiregions.api.config.AttributeableEntity
org.apache.sling.feature.extension.apiregions.api.config.Range
A numerical value range
This class is not thread safe.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear the object and reset to defaultsprotected jakarta.json.JsonObjectBuilderConvert this object into JSONvoidfromJSONObject(jakarta.json.JsonObject jsonObj) Extract the metadata from the JSON object.getMax()Get the max valuegetMin()Get the min valuevoidSet the max valuevoidSet the min valuetoString()Methods inherited from class org.apache.sling.feature.extension.apiregions.api.config.AttributeableEntity
getAttributes, getBoolean, getInteger, getNumber, getString, getString, getStringArray, setDefaults, setString, setStringArray, toJSONObject
-
Constructor Details
-
Range
public Range()
-
-
Method Details
-
clear
public void clear()Clear the object and reset to defaults- Overrides:
clearin classAttributeableEntity
-
fromJSONObject
Extract the metadata from the JSON object. This method first callsclear()- Overrides:
fromJSONObjectin classAttributeableEntity- Parameters:
jsonObj- The JSON Object- Throws:
IOException- If JSON parsing fails
-
getMin
Get the min value- Returns:
- the min or
null
-
setMin
Set the min value- Parameters:
min- the min to set
-
getMax
Get the max value- Returns:
- the max or
null
-
setMax
Set the max value- Parameters:
max- the max to set
-
createJson
Convert this object into JSON- Overrides:
createJsonin classAttributeableEntity- Returns:
- The json object builder
- Throws:
IOException- If generating the JSON fails
-
toString
-