Package com.flagsmith.flagengine.utils
Class Hashing
- java.lang.Object
-
- com.flagsmith.flagengine.utils.Hashing
-
public class Hashing extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FloatgetHashedPercentageForObjectIds(List<String> ids)Returns the percentage of hash of the list of object IDs.FloatgetHashedPercentageForObjectIds(List<String> ids, Integer iterations)Returns the percentage of hash of the list of object IDs with iteration.static HashinggetInstance()Returns the hashing instance.StringgetMD5(String hash)returns the mdt of the string provided.static voidsetInstance(Hashing instanceObj)Set the instance object.
-
-
-
Method Detail
-
getInstance
public static Hashing getInstance()
Returns the hashing instance.- Returns:
-
setInstance
public static void setInstance(Hashing instanceObj)
Set the instance object.- Parameters:
instanceObj- Instance obj of Hashing
-
getHashedPercentageForObjectIds
public Float getHashedPercentageForObjectIds(List<String> ids)
Returns the percentage of hash of the list of object IDs.- Parameters:
ids- List of string IDs- Returns:
-
getHashedPercentageForObjectIds
public Float getHashedPercentageForObjectIds(List<String> ids, Integer iterations)
Returns the percentage of hash of the list of object IDs with iteration.- Parameters:
ids- List of string IDs.iterations- Number of iterations for the string to be repeated.- Returns:
-
-