org.apache.lucene.util
Class StringInterner

java.lang.Object
  extended by org.apache.lucene.util.StringInterner
Direct Known Subclasses:
SimpleStringInterner

public class StringInterner
extends 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
StringInterner()
           
 
Method Summary
 String intern(char[] arr, int offset, int len)
          Returns a single object instance for each equal string.
 String intern(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 String intern(String s)
Returns a single object instance for each equal string.


intern

public String intern(char[] arr,
                     int offset,
                     int len)
Returns a single object instance for each equal string.



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