org.openpipeline.util
Interface CharSpan

All Superinterfaces:
CharSequence
All Known Implementing Classes:
FastStringBuffer, TextValue, Token

public interface CharSpan
extends CharSequence

Describes a span of characters in a char [] array.


Method Summary
 char[] getArray()
          Get the underlying character array.
 int getOffset()
          Get the offset within the char [] array where this span starts.
 int size()
          Return the number of characters in this span.
 String toString()
          Create a new String that contains the chars covered by this span.
 
Methods inherited from interface java.lang.CharSequence
charAt, length, subSequence
 

Method Detail

getArray

char[] getArray()
Get the underlying character array. The span covers some portion of this array.

Returns:
underlying char array

getOffset

int getOffset()
Get the offset within the char [] array where this span starts.

Returns:
a starting offset in the array

size

int size()
Return the number of characters in this span.

Returns:
number of chars covered

toString

String toString()
Create a new String that contains the chars covered by this span.

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