Interface FeatureValueTypeAdaptor<T>
- Type Parameters:
T- the other, alternative FeatureValue representation
public interface FeatureValueTypeAdaptor<T>
A converter that knows how to convert back and forth between Feathr's
FeatureValue and some other
representation. Implementations' "to" and "from" methods are expected to be inverses of each other, such that
toFeathrFeatureValue(fromFeathrFeatureValue(x)) = x and fromFeathrFeatureValue(toFeathrFeatureValue(x)) = x,
for any instance 'x' of FeatureValue.
NOTE: This class is intended for advanced users only, and specifically as a "migration aid" for migrating from
some previous versions of Feathr whose FeatureValue representations had a different class name, while preserving
compatibility with feature definitions written against those older versions of Feathr.-
Method Summary
Modifier and TypeMethodDescriptionfromFeathrFeatureValue(FeatureValue featureValue) Convert from Feathr FeatureValue into the "other" representation.toFeathrFeatureValue(T other) Convert from the "other" representation into Feathr FeatureValue.
-
Method Details
-
toFeathrFeatureValue
Convert from the "other" representation into Feathr FeatureValue. It is expected to be the inverse offromFeathrFeatureValue(FeatureValue)- Parameters:
other- the feature value in the "other" representation- Returns:
- the feature value represented as a Feathr FeatureValue
-
fromFeathrFeatureValue
Convert from Feathr FeatureValue into the "other" representation. It is expected to be the inverse oftoFeathrFeatureValue(Object)- Parameters:
featureValue- the feature value represented as a Feathr FeatureValue- Returns:
- the feature value in the "other" representation
-