public class Helpers
extends java.lang.Object
Constructor and Description |
---|
Helpers() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.lang.String> |
genHashingIndexKeys(int numTasks)
Generates a key that hashes to each task in a range of tasks.
|
static java.util.List<java.lang.String> |
genHashingIndexKeys(java.lang.String prefix,
int numTasks)
Generates a key starting with the given prefix that hashes to each task
in a range of tasks.
|
static java.lang.String |
genPStateVar()
Generates a unique PState var
|
static java.lang.String |
genPStateVar(java.lang.String prefix)
Generates a unique PState var with the given prefix
|
static java.lang.String |
genVar()
Generates a unique var
|
static java.lang.String |
genVar(java.lang.String prefix)
Generates a unique var with the given prefix
|
static java.lang.String |
getGeneratedVarPrefix(java.lang.String var)
Gets prefix string used to generate a var
|
static boolean |
isGeneratedVar(java.lang.String s)
Tests if a string has the format of a regular var or PState var
|
public static java.lang.String genVar(java.lang.String prefix)
prefix
- Prefix stringpublic static java.lang.String genVar()
public static java.lang.String genPStateVar(java.lang.String prefix)
prefix
- Prefix stringpublic static java.lang.String genPStateVar()
public static boolean isGeneratedVar(java.lang.String s)
s
- String to testpublic static java.lang.String getGeneratedVarPrefix(java.lang.String var)
var
- Varpublic static java.util.List<java.lang.String> genHashingIndexKeys(int numTasks)
numTasks
- Number of taskspublic static java.util.List<java.lang.String> genHashingIndexKeys(java.lang.String prefix, int numTasks)
prefix
- Prefix for each generated keynumTasks
- Number of tasks