Class NoOpStringInterner

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

@Internal @ThreadSafe public class NoOpStringInterner extends Object implements StringInterner
A no-op StringInterner implementation, which does not intern. It just returns the input as is.
  • Constructor Details

    • NoOpStringInterner

      public NoOpStringInterner()
  • Method Details

    • intern

      public String intern(String sample)
      Interns and returns a reference to the representative instance for any collection of string instances that are equal to each other.
      Specified by:
      intern in interface StringInterner
      Parameters:
      sample - string instance to be interned
      Returns:
      reference to the interned string instance