I have another suggestion. In your original code, there's no reason that final String[] c needs to be defined inside the translate() method. That means a new String[] array will be created and initialized every time the method is run. Since the array never changes, there's no need to do that. Instead, define the variable
outside the method, as a private static final member variable. That way you just create it and initialize it once.
Similarly, if you use a regular expression, you can define a
Pattern variable for it - and again, that Pattern can be a private final static variable, initialized only once. Or if you use a HashSet, that can be held in a private static final variable, initialized only once.
Personally I would just use the HashSet, as all three methods are approximately equal in length & complexity, but the HashSet is likely to be fastest. If it turns out later that performance needs improvement in this area, then I'd test alternatives. But my gut tells me to try the HashSet first.