Package opennlp.tools.util.jvm

# 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 Summary

  Constructors
  Constructor
  Description
  `HMStringInterner()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `intern(String sample)`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### HMStringInterner

    public HMStringInterner()

- ## Method Details

  - ### intern

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