Package com.flagsmith.models
Class TraitConfig
java.lang.Object
com.flagsmith.models.TraitConfig
public class TraitConfig extends Object
Use TraitConfig to provide a trait value
along with additional parameters.
Construct a transient trait value:
new TraitConfig("value", true);
-
Constructor Summary
Constructors Constructor Description TraitConfig(Object value, boolean isTransient)Get a TraitConfig instance. -
Method Summary
Modifier and Type Method Description static TraitConfigfromObject(Object object)Convert a user-provided object to a TraitConfig instance.booleangetIsTransient()Get a boolean indicating whether the trait is transient.ObjectgetValue()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
-