private static boolean isWordBoundary(CharSequence singleChar,String wordSeparators){
  return TextUtils.isEmpty(singleChar) || wordSeparators.contains(singleChar);
}

private static boolean isWordBoundary ( CharSequence singleChar , String wordSeparators ) { return TextUtils . isEmpty ( singleChar ) || wordSeparators . contains ( singleChar ) ; }
takes a character sequence with a single character and checks if the character occurs in a list of word separators or is empty .
