public class SoftWrapImpl extends java.lang.Object implements SoftWrap
SoftWrap
implementation that is built around TextChangeImpl
.Constructor and Description |
---|
SoftWrapImpl(TextChangeImpl change,
int indentInColumns,
int indentInPixels) |
Modifier and Type | Method and Description |
---|---|
void |
advance(int diff) |
boolean |
equals(java.lang.Object o) |
TextChangeImpl |
getChange() |
char [] |
getChars()
Allows to get change text as a char array.
|
int |
getEnd() |
int |
getIndentInColumns() |
int |
getIndentInPixels() |
int |
getStart() |
java.lang.CharSequence |
getText()
Allows to retrieve text that is directly affected by the change encapsulated by the current object.
|
int |
hashCode() |
java.lang.String |
toString() |
public SoftWrapImpl(TextChangeImpl change, int indentInColumns, int indentInPixels)
public int getStart()
getStart
in interface TextChange
public int getEnd()
getEnd
in interface TextChange
public java.lang.CharSequence getText()
TextChange
getText
in interface TextChange
public char [] getChars()
TextChange
TextChange.getText()
result.
Generally speaking, this method is introduced just as a step toward existing high-performance services that work in terms
of char arrays. Resulting array is instantiated on-demand via CharArrayUtil.fromSequence(CharSequence)
, hence, it
doesn't hit memory if, for example, CharSequenceBackedByArray
is used as initial change text.getChars
in interface TextChange
public int getIndentInColumns()
getIndentInColumns
in interface SoftWrap
public int getIndentInPixels()
getIndentInPixels
in interface SoftWrap
public TextChangeImpl getChange()
public void advance(int diff)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object