Class StringPool


  • public final class StringPool
    extends Object
    A pool of string instances. Unlike the VM's interned strings, this pool provides no guarantee of reference equality. It is intended only to save allocations. This class is not thread safe.
    • Constructor Detail

      • StringPool

        public StringPool()
    • Method Detail

      • get

        public String get​(char[] array,
                          int start,
                          int length)
        Returns a string equal to new String(array, start, length).