Jacson

de.spieleck.app.cngram
Class LightCharSequence

java.lang.Object
  extended by de.spieleck.app.cngram.LightCharSequence
All Implemented Interfaces:
java.lang.CharSequence
Direct Known Subclasses:
NGramImpl

public class LightCharSequence
extends java.lang.Object
implements java.lang.CharSequence

A very light (and therefore fast, efficient) implementation of a CharSequence. Tailored for Ngram purpose.

Version:
$Revision: 2 $ $Date: 2006-03-27 23:00:21 +0200 (Mo, 27 Mrz 2006) $ $Author: nestefan $
Author:
frank nestel, $Author: nestefan $

Constructor Summary
LightCharSequence(java.lang.CharSequence seq)
           
LightCharSequence(java.lang.CharSequence seq, int start, int end)
           
 
Method Summary
protected  void calcHashCode()
           
 char charAt(int pos)
           
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 int length()
           
 java.lang.CharSequence subSequence(int start, int end)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LightCharSequence

public LightCharSequence(java.lang.CharSequence seq)

LightCharSequence

public LightCharSequence(java.lang.CharSequence seq,
                         int start,
                         int end)
Method Detail

calcHashCode

protected void calcHashCode()

charAt

public char charAt(int pos)
Specified by:
charAt in interface java.lang.CharSequence

length

public int length()
Specified by:
length in interface java.lang.CharSequence

subSequence

public java.lang.CharSequence subSequence(int start,
                                          int end)
Specified by:
subSequence in interface java.lang.CharSequence

toString

public java.lang.String toString()
Specified by:
toString in interface java.lang.CharSequence
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

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

spieleck.de