Package co.featbit.commons.model
Class FlagState<T>
java.lang.Object
co.featbit.commons.model.BasicFlagState
co.featbit.commons.model.FlagState<T>
- Type Parameters:
T- String/Boolean/Numeric Type
- All Implemented Interfaces:
Serializable
The object provides a standard return responding the request of getting a flag value from a client sdk
- See Also:
-
Field Summary
Fields inherited from class co.featbit.commons.model.BasicFlagState
message, success -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> FlagState<T>build a flag state without flag valuebooleanstatic <T> FlagState<T>build a flag state from jsongetData()return the flag value with all the detailsinthashCode()static <T> FlagState<T>of(EvalDetail<T> data) build a good flag stattoString()Methods inherited from class co.featbit.commons.model.BasicFlagState
getMessage, isSuccess, jsonfy
-
Method Details
-
of
build a good flag stat- Type Parameters:
T- String/Boolean/Numeric Type- Parameters:
data- a flag value with reason- Returns:
- a FlagState
-
empty
build a flag state without flag value- Type Parameters:
T- String/Boolean/Numeric Type- Parameters:
message- message the reason without flag value- Returns:
- a FlagState
-
fromJson
build a flag state from json- Type Parameters:
T- String/Boolean/Numeric Type- Parameters:
json- a string jsoncls- class to deserialize- Returns:
- a FlagState
-
getData
return the flag value with all the details- Returns:
EvalDetail
-
toString
-
equals
-
hashCode
public int hashCode()
-