|
Carrot2 v3.6.0-SNAPSHOT
API Documentation |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.text.util.MutableCharArray
public final class MutableCharArray
Implements CharSequence over a mutable char[] buffer.
This class implements proper content-based hashCode() and
equals(Object) against other MutableCharArray objects, assuming the
underlying character buffers does not change. In case the buffers is changed, the
resulting behavior is unpredictable.
| Constructor Summary | |
|---|---|
MutableCharArray()
Creates an empty MutableCharArray. |
|
MutableCharArray(char[] buffer)
Resets the internal buffer to use the provided argument. |
|
MutableCharArray(char[] buffer,
int start,
int length)
Resets the internal buffer to use the provided argument. |
|
MutableCharArray(CharSequence seq)
Creates a MutableCharArray from another CharSequence,
creates a new buffer to store characters. |
|
| Method Summary | |
|---|---|
char |
charAt(int index)
|
MutableCharArray |
clone()
|
boolean |
equals(Object other)
See comments in the header of this class. |
char[] |
getBuffer()
|
int |
getStart()
|
int |
hashCode()
See comments in the header of this class. |
static int |
hashCode(char[] buffer,
int start,
int length)
Calculates a hash code for a given portion of the character buffer. |
int |
length()
|
void |
reset(char[] buffer)
Resets internal buffers in this object to point to another character buffer. |
void |
reset(char[] buffer,
int start,
int length)
Resets internal buffers in this object to point to another character buffer. |
void |
reset(CharSequence seq)
Resets internal buffers in this object to represent another character sequence. |
MutableCharArray |
subSequence(int start,
int end)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MutableCharArray()
MutableCharArray.
public MutableCharArray(CharSequence seq)
MutableCharArray from another CharSequence,
creates a new buffer to store characters.
public MutableCharArray(char[] buffer)
reset(char[])
public MutableCharArray(char[] buffer,
int start,
int length)
reset(char[])| Method Detail |
|---|
public void reset(CharSequence seq)
equals(Object) and
hashCode().
public void reset(char[] buffer)
equals(Object) and
hashCode().
public void reset(char[] buffer,
int start,
int length)
equals(Object) and
hashCode().
public char[] getBuffer()
public int getStart()
getBuffer(),
lengthpublic final char charAt(int index)
charAt in interface CharSequencepublic int length()
length in interface CharSequence
public MutableCharArray subSequence(int start,
int end)
subSequence in interface CharSequencepublic String toString()
toString in interface CharSequencetoString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object other)
equals in class Object
public static final int hashCode(char[] buffer,
int start,
int length)
hashCode() if a wrapper
MutableCharArray were created.
public MutableCharArray clone()
clone in class Object
|
Please refer to project documentation at
http://project.carrot2.org |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||