The getAllVariants() method currently returns List<SelectedVariant<Object>>.
SelectedVariant does not include any reference to the flag key for which it is a variant, so there is no way to associate the output of this method with a specific feature flag.
Mixpanel SDKs for other languages (e.g. python, node) address this by returning a dictionary that maps a flag key to variant information. So in this case, a method with a return type of Map<String, SelectedVariant<Object>> would be most consistent with other SDKs.
The getAllVariants() method currently returns
List<SelectedVariant<Object>>.SelectedVariantdoes not include any reference to the flag key for which it is a variant, so there is no way to associate the output of this method with a specific feature flag.Mixpanel SDKs for other languages (e.g. python, node) address this by returning a dictionary that maps a flag key to variant information. So in this case, a method with a return type of
Map<String, SelectedVariant<Object>>would be most consistent with other SDKs.