activemq-cpp-3.4.0
|
A CharSequence is a readable sequence of char values. More...
#include <src/main/decaf/lang/CharSequence.h>
Public Member Functions | |
virtual | ~CharSequence () |
virtual int | length () const =0 |
virtual char | charAt (int index) const =0 |
Returns the Char at the specified index so long as the index is not greater than the length of the sequence. | |
virtual CharSequence * | subSequence (int start, int end) const =0 |
Returns a new CharSequence that is a subsequence of this sequence. | |
virtual std::string | toString () const =0 |
A CharSequence is a readable sequence of char values.
This interface provides uniform, read-only access to many different kinds of char sequences.
This interface does not define that a CharSequence should implement comparable, it is therefore up to the dervied classes that implement this interface to define equality, which implies that comparison of two CharSequences does not have a contract on equality.
virtual decaf::lang::CharSequence::~CharSequence | ( | ) | [inline, virtual] |
virtual char decaf::lang::CharSequence::charAt | ( | int | index | ) | const [pure virtual] |
Returns the Char at the specified index so long as the index is not greater than the length of the sequence.
index | The position to return the char at. |
IndexOutOfBoundsException | if index is > than length() or negative |
Implemented in decaf::lang::String, and decaf::nio::CharBuffer.
virtual int decaf::lang::CharSequence::length | ( | ) | const [pure virtual] |
Implemented in decaf::lang::String, and decaf::nio::CharBuffer.
virtual CharSequence* decaf::lang::CharSequence::subSequence | ( | int | start, |
int | end | ||
) | const [pure virtual] |
Returns a new CharSequence that is a subsequence of this sequence.
The subsequence starts with the char value at the specified index and ends with the char value at index end - 1. The length (in chars) of the returned sequence is end - start, so if start == end then an empty sequence is returned.
start | The start index, inclusive. |
end | The end index, exclusive. |
IndexOutOfBoundsException | if start or end > length() or start or end are negative. |
Implemented in decaf::internal::nio::CharArrayBuffer, decaf::lang::String, and decaf::nio::CharBuffer.
virtual std::string decaf::lang::CharSequence::toString | ( | ) | const [pure virtual] |
Implemented in decaf::lang::String, and decaf::nio::CharBuffer.