SegmentOps interface and reduces boilerplate,
so that a developer only needs to implement methods for real segments, not empty ones. Optionally,
joinSeg(Object, Object) and joinStyle(Object, Object) can be overridden as well.
| Modifier and Type | Field and Description |
|---|---|
| private final SEG |
| Access | Constructor and Description |
|---|---|
| public | SegmentOpsBase(SEG emptySeg)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public final char | |
| public final SEG | createEmptySeg()
Implements org. Creates an empty segment. |
| public final String | |
| public Optional | joinStyle(S currentStyle, S nextStyle)
Overrides default org. Joins two consecutive styles together into one or |
| public abstract char | |
| public abstract String | |
| public abstract SEG | |
| public SEG | |
| public final SEG | subSequence(SEG seg, int start, int end)
Implements org.
|
| public final SEG |
| empty | back to summary |
|---|---|
| private final SEG empty | |
| SegmentOpsBase | back to summary |
|---|---|
| public SegmentOpsBase(SEG emptySeg) Creates a | |
| charAt | back to summary |
|---|---|
| public final char charAt(SEG seg, int index) Implements org.
| |
| createEmptySeg | back to summary |
|---|---|
| public final SEG createEmptySeg() Implements org. Doc from org. Creates an empty segment. This method should return the same object for better performance and memory usage.
| |
| getText | back to summary |
|---|---|
| public final String getText(SEG seg) Implements org.
| |
| joinStyle | back to summary |
|---|---|
| public Optional Overrides default org. Doc from org. Joins two consecutive styles together into one or
| |
| realCharAt | back to summary |
|---|---|
| public abstract char realCharAt(SEG seg, int index) | |
| realGetText | back to summary |
|---|---|
| public abstract String realGetText(SEG seg) | |
| realSubSequence | back to summary |
|---|---|
| public abstract SEG realSubSequence(SEG seg, int start, int end) | |
| realSubSequence | back to summary |
|---|---|
| public SEG realSubSequence(SEG seg, int start) | |
| subSequence | back to summary |
|---|---|
| public final SEG subSequence(SEG seg, int start, int end) Implements org.
| |
| subSequence | back to summary |
|---|---|
| public final SEG subSequence(SEG seg, int start) Implements org.
| |