code: public static CharArraySet copy(final Set<?> set) {
      if (set == EMPTY_SET)
        return EMPTY_SET;
      if (set instanceof CharArraySet) {
        final CharArraySet source = (CharArraySet) set;
        return new CharArraySet(CharArrayMap.copy(source.map));
      }
      return new CharArraySet(set, false);
    }
docs: Returns a copy of the given set as a {@link CharArraySet}. If the given set
  is a {@link CharArraySet} the ignoreCase property will be preserved.
  
  @param set a set to copy
  @return a copy of the given set as a {@link CharArraySet}. If the given set
  is a {@link CharArraySet} the ignoreCase property as well as the
  matchVersion will be of the given set will be preserved.