Class StringPool

java.lang.Object
org.openl.util.StringPool

public final class StringPool extends Object
A cache pool for strings. This util is a replacement for Java's String.intern() but it does not use Perm Gen. All strings in this pool are weak referenced, so they can be garbage collected.

Note that this implementation is synchronized.

Author:
Yury Mmolchan
  • Method Details

    • intern

      public static String intern(String value)
      Returns a canonical representation for the string object. It works like String.intern() but it uses own pool for collecting unique strings.
      See Also: