Package com.arms.api.wiki.dto
Class TextOperation
java.lang.Object
com.arms.api.wiki.dto.TextOperation
Represents an operation on a text document, similar to ot.js TextOperation.
Operations consist of a list of ops:
- Positive integer: Retain (skip) characters.
- String: Insert characters.
- Negative integer: Delete characters.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondelete(int n) booleanintgetOps()intinthashCode()static booleanstatic booleanbooleanisNoop()static booleanretain(int n) voidsetBaseLength(int baseLength) voidvoidsetTargetLength(int targetLength) toString()
-
Constructor Details
-
TextOperation
public TextOperation() -
TextOperation
-
-
Method Details
-
isRetain
-
isInsert
-
isDelete
-
retain
-
insert
-
delete
-
getOps
-
getBaseLength
public int getBaseLength() -
getTargetLength
public int getTargetLength() -
isNoop
public boolean isNoop() -
equals
-
hashCode
public int hashCode() -
toString
-
setOps
-
setBaseLength
public void setBaseLength(int baseLength) -
setTargetLength
public void setTargetLength(int targetLength)
-