Class HMStringInterner

java.lang.Object
opennlp.tools.util.jvm.HMStringInterner
All Implemented Interfaces:
opennlp.tools.util.jvm.StringInterner

@Internal public class HMStringInterner extends Object implements opennlp.tools.util.jvm.StringInterner
A StringInterner implementation based on HashMap by Aleksey Shipilëv. This implementation is not thread-safe.

Origin: https://shipilev.net/jvm/anatomy-quarks/10-string-intern/

  • Constructor Details

    • HMStringInterner

      public HMStringInterner()
  • Method Details

    • intern

      public String intern(String sample)
      Specified by:
      intern in interface opennlp.tools.util.jvm.StringInterner