com.wcohen.ss
Class BasicStringWrapper

java.lang.Object
  extended by com.wcohen.ss.BasicStringWrapper
All Implemented Interfaces:
StringWrapper
Direct Known Subclasses:
MatchData.Instance, MultiStringWrapper, TagLink.UnitVector, TFIDF.UnitVector

public class BasicStringWrapper
extends java.lang.Object
implements StringWrapper

An extendible (non-final) class that implements some of the functionality of a string.


Constructor Summary
BasicStringWrapper(java.lang.String s)
           
 
Method Summary
 char charAt(int i)
          Return the i-th char of the wrapped string
 int hashCode()
           
 int length()
          Return the length of the wrapped string
 java.lang.String toString()
           
 java.lang.String unwrap()
          Return the string that is wrapped.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicStringWrapper

public BasicStringWrapper(java.lang.String s)
Method Detail

charAt

public char charAt(int i)
Description copied from interface: StringWrapper
Return the i-th char of the wrapped string

Specified by:
charAt in interface StringWrapper

length

public int length()
Description copied from interface: StringWrapper
Return the length of the wrapped string

Specified by:
length in interface StringWrapper

unwrap

public java.lang.String unwrap()
Description copied from interface: StringWrapper
Return the string that is wrapped.

Specified by:
unwrap in interface StringWrapper

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object