SEG
- type of segmentS
- type of stylepublic abstract class NodeSegmentOpsBase<SEG,S> extends SegmentOpsBase<SEG,S>
SegmentOps
when implementing a non-text custom object, such as a shape or image,
and reduces boilerplate. Developers may want to override joinSeg(Object, Object)
and
SegmentOpsBase.joinStyle(Object, Object)
.Constructor and Description |
---|
NodeSegmentOpsBase(SEG empty) |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<SEG> |
joinSeg(SEG currentSeg,
SEG nextSeg)
Joins two consecutive segments together into one or
Optional.empty() if they cannot be joined. |
char |
realCharAt(SEG seg,
int index) |
java.lang.String |
realGetText(SEG seg) |
SEG |
realSubSequence(SEG seg,
int start) |
SEG |
realSubSequence(SEG seg,
int start,
int end) |
charAt, createEmptySeg, getText, joinStyle, subSequence, subSequence
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
either, either, eitherStyles, length, or, orStyled, styledTextOps, styledTextOps
public NodeSegmentOpsBase(SEG empty)
public char realCharAt(SEG seg, int index)
realCharAt
in class SegmentOpsBase<SEG,S>
public java.lang.String realGetText(SEG seg)
realGetText
in class SegmentOpsBase<SEG,S>
public SEG realSubSequence(SEG seg, int start, int end)
realSubSequence
in class SegmentOpsBase<SEG,S>
public SEG realSubSequence(SEG seg, int start)
realSubSequence
in class SegmentOpsBase<SEG,S>
public java.util.Optional<SEG> joinSeg(SEG currentSeg, SEG nextSeg)
SegmentOps
Optional.empty()
if they cannot be joined.