org.jproggy.snippetory.engine.chars
Class CharSequences

java.lang.Object
  extended by org.jproggy.snippetory.engine.chars.CharSequences
All Implemented Interfaces:
CharSequence, SelfAppender
Direct Known Subclasses:
DataSinks

public abstract class CharSequences
extends Object
implements CharSequence, SelfAppender

CharSequences is a helper class to implement 'CompoundCharSequences' i.e. CharSequences consisting of several parts.

Author:
B. Ebertz

Constructor Summary
CharSequences()
           
 
Method Summary
 char charAt(int index)
          there are some optimizations for subsequent calls of charAt with increasing index.
 int length()
           
protected abstract  CharSequence part(int index)
          provide one of the parts
protected abstract  int partCount()
          the number of distinct parts connected by this instance
 String subSequence(int start, int end)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jproggy.snippetory.engine.chars.SelfAppender
appendTo
 

Constructor Detail

CharSequences

public CharSequences()
Method Detail

partCount

protected abstract int partCount()
the number of distinct parts connected by this instance


part

protected abstract CharSequence part(int index)
provide one of the parts


charAt

public char charAt(int index)
there are some optimizations for subsequent calls of charAt with increasing index.

Specified by:
charAt in interface CharSequence

length

public int length()
Specified by:
length in interface CharSequence

toString

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

subSequence

public String subSequence(int start,
                          int end)
Specified by:
subSequence in interface CharSequence


Copyright © 2013. All Rights Reserved.