MessageBuilder.SplitPolicy.CharSequenceSplitPolicy
public static interface MessageBuilder.SplitPolicy
MessageBuilder.buildAll(SplitPolicy...)
.Modifier and Type | Interface | Description |
---|---|---|
static class |
MessageBuilder.SplitPolicy.CharSequenceSplitPolicy |
Default
MessageBuilder.SplitPolicy implementation. |
Modifier and Type | Field | Description |
---|---|---|
static MessageBuilder.SplitPolicy |
ANYWHERE |
Splits exactly after 2000 chars.
|
static MessageBuilder.SplitPolicy |
NEWLINE |
Splits on newline chars
`\n` . |
static MessageBuilder.SplitPolicy |
SPACE |
Splits on space chars
` ` . |
Modifier and Type | Method | Description |
---|---|---|
int |
nextMessage(int currentBeginIndex,
MessageBuilder builder) |
Calculates the endIndex for the next
Message . |
static MessageBuilder.SplitPolicy |
onChars(java.lang.CharSequence chars,
boolean remove) |
Creates a new
MessageBuilder.SplitPolicy splitting on the specified chars. |
static final MessageBuilder.SplitPolicy NEWLINE
`\n`
.static final MessageBuilder.SplitPolicy SPACE
` `
.static final MessageBuilder.SplitPolicy ANYWHERE
static MessageBuilder.SplitPolicy onChars(java.lang.CharSequence chars, boolean remove)
MessageBuilder.SplitPolicy
splitting on the specified chars.chars
- the chars to split onremove
- weather to remove the chars when splitting on themMessageBuilder.SplitPolicy
int nextMessage(int currentBeginIndex, MessageBuilder builder)
Message
.currentBeginIndex
- the index the next Message
should start frombuilder
- the MessageBuilder
Message
java.lang.IllegalStateException
- when splitting fails