|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mmm.util.lang.base.CoreCharSequence
net.sf.mmm.util.lang.base.CharSubSequence
public class CharSubSequence
This is an implementation of the CharSequence Interface
that can be used to implement the method
CharSequence.subSequence(int, int).
ATTENTION: This implementation assumes that the original char sequence has an
immutable length (at least it should NOT
shrink)!
| Field Summary | |
|---|---|
private int |
length
the length of the sub-sequence |
private CharSequence |
original
the original sequence that is wrapped here |
private int |
start
the start position of the sub-sequence |
| Constructor Summary | |
|---|---|
CharSubSequence(CharSequence originalSequence,
int startPosition,
int endPosition)
The constructor. |
|
| Method Summary | |
|---|---|
char |
charAt(int index)
|
int |
length()
|
CharSequence |
subSequence(int startPosition,
int endPosition)
|
| Methods inherited from class net.sf.mmm.util.lang.base.CoreCharSequence |
|---|
contentChanged, equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final CharSequence original
private final int start
private final int length
| Constructor Detail |
|---|
public CharSubSequence(CharSequence originalSequence,
int startPosition,
int endPosition)
originalSequence - is the underlying sequence.startPosition - is the start-index in originalSequence.endPosition - is the end-index in originalSequence.| Method Detail |
|---|
public CharSequence subSequence(int startPosition,
int endPosition)
public int length()
public char charAt(int index)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||