Class StringPool


  • public class StringPool
    extends java.lang.Object
    Faster than String.intern()

    WARNING: This API is unstable and intended for internal use only.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.concurrent.ConcurrentHashMap<java.lang.String,​java.lang.String> _map  
      private int _misses  
      private long _size  
      private int _total  
      private static StringPool INSTANCE  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private StringPool()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String get​(java.lang.String value)
      This method is intended for internal use only.
      static void printStats()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • INSTANCE

        private static final StringPool INSTANCE
      • _map

        private final java.util.concurrent.ConcurrentHashMap<java.lang.String,​java.lang.String> _map
      • _misses

        private int _misses
      • _total

        private int _total
      • _size

        private long _size
    • Constructor Detail

      • StringPool

        private StringPool()
    • Method Detail

      • get

        public static java.lang.String get​(java.lang.String value)
        This method is intended for internal use only.
      • printStats

        public static void printStats()