Package net.dv8tion.jda.api
Interface MessageBuilder.SplitPolicy
- 
- All Known Implementing Classes:
- MessageBuilder.SplitPolicy.CharSequenceSplitPolicy
 - Enclosing class:
- MessageBuilder
 
 public static interface MessageBuilder.SplitPolicyInterface to allow custom implementation of Splitting rules forMessageBuilder.buildAll(SplitPolicy...).
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static classMessageBuilder.SplitPolicy.CharSequenceSplitPolicyDefaultMessageBuilder.SplitPolicyimplementation.
 - 
Field SummaryFields Modifier and Type Field Description static MessageBuilder.SplitPolicyANYWHERESplits exactly after 2000 chars.static MessageBuilder.SplitPolicyNEWLINESplits on newline chars`\n`.static MessageBuilder.SplitPolicySPACESplits on space chars` `.
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description intnextMessage(int currentBeginIndex, MessageBuilder builder)Calculates the endIndex for the nextMessage.static MessageBuilder.SplitPolicyonChars(java.lang.CharSequence chars, boolean remove)Creates a newMessageBuilder.SplitPolicysplitting on the specified chars.
 
- 
- 
- 
Field Detail- 
NEWLINEstatic final MessageBuilder.SplitPolicy NEWLINE Splits on newline chars`\n`.
 - 
SPACEstatic final MessageBuilder.SplitPolicy SPACE Splits on space chars` `.
 - 
ANYWHEREstatic final MessageBuilder.SplitPolicy ANYWHERE Splits exactly after 2000 chars.
 
- 
 - 
Method Detail- 
onChars@Nonnull static MessageBuilder.SplitPolicy onChars(@Nonnull java.lang.CharSequence chars, boolean remove) Creates a newMessageBuilder.SplitPolicysplitting on the specified chars.- Parameters:
- chars- the chars to split on
- remove- whether to remove the chars when splitting on them
- Returns:
- a new MessageBuilder.SplitPolicy
 
 - 
nextMessageint nextMessage(int currentBeginIndex, MessageBuilder builder)Calculates the endIndex for the nextMessage.- Parameters:
- currentBeginIndex- the index the next- Messageshould start from
- builder- the- MessageBuilder
- Returns:
- the end Index of the next Message
- Throws:
- java.lang.IllegalStateException- when splitting fails
 
 
- 
 
-