-
public final class LimitAdapterAdapter class for converting a JSON object representing a limit into a LimitAdapter instance.
The class extracts information about the limit type, limit value, and frequency from the provided JSON object. It also provides a method to convert the LimitAdapter instance back into a JSON object.
-
-
Constructor Summary
Constructors Constructor Description LimitAdapter(JSONObject limitJSON)
-
Method Summary
Modifier and Type Method Description final LimitTypegetLimitType()The type of the limit, determined by the LimitType enum. final IntegergetLimit()The numeric value representing the limit. final IntegergetFrequency()The frequency associated with the limit (e.g., up to 4 times in 8 hours). final JSONObjecttoJsonObject()Converts the LimitAdapter instance into a JSON object. -
-
Constructor Detail
-
LimitAdapter
LimitAdapter(JSONObject limitJSON)
- Parameters:
limitJSON- The JSON object representing the limit information.
-
-
Method Detail
-
getLimitType
final LimitType getLimitType()
The type of the limit, determined by the LimitType enum.
-
getFrequency
final Integer getFrequency()
The frequency associated with the limit (e.g., up to 4 times in 8 hours). Here 4 is limit, 8 is frequency and hours is limit type.
-
toJsonObject
final JSONObject toJsonObject()
Converts the LimitAdapter instance into a JSON object.
-
-
-
-