default @NotNull T decorations(final @NotNull Set<TextDecoration> decorations, final boolean flag) {
    return this.decorations(decorations.stream().collect(Collectors.toMap(Function.identity(), decoration -> TextDecoration.State.byBoolean(flag))));
  }
Sets the state of a set of decorations to {@code flag}.

@param decorations the decorations
@param flag {@code true} if this builder should have the decorations, {@code false} if
    this builder should not have the decorations
@return an object ({@code T})
@since 4.10.0
api/src/main/java/net/kyori/adventure/text/format/StyleSetter.java