net.sf.mmm.util.lang.base
Class CoreCharSequence

java.lang.Object
  extended by net.sf.mmm.util.lang.base.CoreCharSequence
All Implemented Interfaces:
CharSequence
Direct Known Subclasses:
AbstractCharSequence, CharSubSequence

public abstract class CoreCharSequence
extends Object
implements CharSequence

This is an abstract base implementation of the CharSequence interface.

Since:
1.0.2
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Field Summary
private  int cachedHash
          the hash of this sequence or 0 if not cached
 
Constructor Summary
CoreCharSequence()
          The constructor.
 
Method Summary
protected  void contentChanged()
          This method must be called whenever the char sequence changed its length or data.
 boolean equals(Object other)
           This implementation is to be discussed, because it can violate the contract of the equals method as defined by Object.
 int hashCode()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.CharSequence
charAt, length, subSequence
 

Field Detail

cachedHash

private int cachedHash
the hash of this sequence or 0 if not cached

Constructor Detail

CoreCharSequence

public CoreCharSequence()
The constructor.

Method Detail

equals

public boolean equals(Object other)
This implementation is to be discussed, because it can violate the contract of the equals method as defined by Object.

Overrides:
equals in class Object

contentChanged

protected void contentChanged()
This method must be called whenever the char sequence changed its length or data.


hashCode

public int hashCode()

Overrides:
hashCode in class Object

toString

public String toString()

Specified by:
toString in interface CharSequence
Overrides:
toString in class Object


Copyright © 2001-2010 mmm-Team. All Rights Reserved.