View Javadoc

1   // String.java, created Thu Jul  4  4:50:03 2002 by joewhaley
2   // Copyright (C) 2001-3 John Whaley <jwhaley@alum.mit.edu>
3   // Licensed under the terms of the GNU LGPL; see COPYING for details.
4   package joeq.ClassLib.Common.java.lang;
5   
6   import joeq.UTF.Utf8;
7   
8   /***
9    * String
10   *
11   * @author  John Whaley <jwhaley@alum.mit.edu>
12   * @version $Id: String.java 1451 2004-03-09 06:27:08Z jwhaley $
13   */
14  public abstract class String {
15  
16      public java.lang.String intern() {
17          // note: this relies on the caching of String objects in Utf8 class
18          java.lang.Object o = this;
19          return Utf8.get((java.lang.String)o).toString();
20      }
21  
22  }