google collections线程安全吗?
发布于 2010-03-04 04:53:13
它的唯一状态是
private final String separator;所以,是的,它是线程安全的。
发布于 2010-03-04 07:48:40
是!我们不会重复SimpleDateFormat的错误。:-)
Joiner需要获得与其姊妹类Splitter类似的文档升级,即:
* <p><b>Warning: splitter instances are always immutable</b>; a configuration
* method such as {@code omitEmptyStrings} has no effect on the instance it
* is invoked on! You must store and use the new splitter instance returned by
* the method. This makes splitters thread-safe, and safe to store as {@code
* static final} constants . . .https://stackoverflow.com/questions/2374823
复制相似问题