org.apache.lucene.util

## Class StringInterner

- java.lang.Object
- - org.apache.lucene.util.StringInterner

- Direct Known Subclasses:
    SimpleStringInterner

      public class StringInterner
      extends java.lang.Object

  Subclasses of StringInterner are required to return the same single String object for all equal strings. Depending on the implementation, this may not be the same object returned as String.intern(). This StringInterner base class simply delegates to String.intern().

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StringInterner()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `intern(char[] arr, int offset, int len)` Returns a single object instance for each equal string.
    `java.lang.String` | `intern(java.lang.String s)` Returns a single object instance for each equal string.

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

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

- - ### Constructor Detail

    - #### StringInterner

          public StringInterner()

  - ### Method Detail

    - #### intern

          public java.lang.String intern(java.lang.String s)

      Returns a single object instance for each equal string.

    - #### intern

          public java.lang.String intern(char[] arr,
                                         int offset,
                                         int len)

      Returns a single object instance for each equal string.

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.