Package opennlp.tools.util.jvm

# Class JvmStringInterner

java.lang.Object
opennlp.tools.util.jvm.JvmStringInterner

All Implemented Interfaces:
  `opennlp.tools.util.jvm.StringInterner`

@Internal @ThreadSafe public class JvmStringInterner extends Object implements opennlp.tools.util.jvm.StringInterner
A `StringInterner` implementation based on `String.intern()`. Strings interned via this implementation are put into PermGen space. If needed, the PermGen memory can be increased by the JVM argument `-XX:MaxPermSize`.

Using this `StringInterner` brings back the default behaviour of OpenNLP before version `2.3.2`. You can use it by setting the system property `opennlp.interner.class` to the fully qualified classname of a `StringInterner` implementation.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JvmStringInterner()`

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

  - ### JvmStringInterner

    public JvmStringInterner()

- ## Method Details

  - ### intern

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