Package com.flagsmith.models
Class TraitConfig
java.lang.Object
com.flagsmith.models.TraitConfig
Use TraitConfig to provide a trait value
along with additional parameters.
Construct a transient trait value:
new TraitConfig("value", true);
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TraitConfigfromObject(Object object) Convert a user-provided object to a TraitConfig instance.booleanGet a boolean indicating whether the trait is transient.getValue()Get trait value.
-
Constructor Details
-
TraitConfig
Get a TraitConfig instance.- Parameters:
value- a trait value objectisTransient- whether the trait is transient
-
-
Method Details
-
getValue
Get trait value.- Returns:
- the trait value
-
getIsTransient
public boolean getIsTransient()Get a boolean indicating whether the trait is transient.- Returns:
- the boolean transiency value
-
fromObject
Convert a user-provided object to a TraitConfig instance.- Parameters:
object- an object or a TraitConfig instance- Returns:
- the TraitConfig instance
-