Class TruncatedString.Builder

java.lang.Object
io.jenkins.plugins.checks.api.TruncatedString.Builder
Enclosing class:
TruncatedString

public static class TruncatedString.Builder extends Object
Builder for TruncatedString.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public TruncatedString build()
      Builds the TruncatedString.
      Returns:
      the build TruncatedString.
    • addText

      public TruncatedString.Builder addText(@NonNull String text)
      Adds a chunk of text to the builder.
      Parameters:
      text - the chunk of text to append to this builder
      Returns:
      this builder
    • withTruncationText

      public TruncatedString.Builder withTruncationText(@NonNull String truncationText)
      Sets the truncation text.
      Parameters:
      truncationText - the text to append on overflow
      Returns:
      this builder
    • setTruncateStart

      public TruncatedString.Builder setTruncateStart()
      Sets truncator to remove excess text from the start, rather than the end.
      Returns:
      this builder
    • setChunkOnNewlines

      public TruncatedString.Builder setChunkOnNewlines()
      Sets truncator to chunk on newlines rather than the chunks.
      Returns:
      this builder