create
public static StringSwitcher create(java.lang.String[] strings,
int[] ints,
boolean fixedInput)
Helper method to create a StringSwitcher.
For finer control over the generated instance, use a new instance of StringSwitcher.Generator
instead of this static method.
- Parameters:
strings - the array of String keys; must be the same length as the value array
ints - the array of integer results; must be the same length as the key array
fixedInput - if false, an unknown key will be returned from intValue(java.lang.String) as -1; if true,
the result will be undefined, and the resulting code will be faster