Package io.jenkins.plugins.checks.api
Class TruncatedString.Builder
java.lang.Object
io.jenkins.plugins.checks.api.TruncatedString.Builder
- Enclosing class:
- TruncatedString
Builder for
TruncatedString
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds a chunk of text to the builder.build()
Builds theTruncatedString
.Sets truncator to chunk on newlines rather than the chunks.Sets truncator to remove excess text from the start, rather than the end.withTruncationText
(String truncationText) Sets the truncation text.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Builds theTruncatedString
.- Returns:
- the build
TruncatedString
.
-
addText
Adds a chunk of text to the builder.- Parameters:
text
- the chunk of text to append to this builder- Returns:
- this builder
-
withTruncationText
Sets the truncation text.- Parameters:
truncationText
- the text to append on overflow- Returns:
- this builder
-
setTruncateStart
Sets truncator to remove excess text from the start, rather than the end.- Returns:
- this builder
-
setChunkOnNewlines
Sets truncator to chunk on newlines rather than the chunks.- Returns:
- this builder
-