public class

BuilderSupport

extends Object
java.lang.Object
   ↳ com.atlassian.bitbucket.util.BuilderSupport
Known Direct Subclasses
Known Indirect Subclasses

Summary

Fields
protected static final Predicate<String> NOT_BLANK
Public Constructors
BuilderSupport()
Protected Methods
static <T> boolean addIf(Predicate<? super T> predicate, Builder<T> builder, T value)
@SafeVarargs static <T> void addIf(Predicate<? super T> predicate, Builder<T> builder, T value, T... values)
static <T> boolean addIf(Predicate<? super T> predicate, Collection<T> collection, T value)
static <T> void addIf(Predicate<? super T> predicate, Builder<T> builder, Iterable<? extends T> values)
@SafeVarargs static <T> void addIf(Predicate<? super T> predicate, Collection<T> collection, T value, T... values)
static <T> void addIf(Predicate<? super T> predicate, Collection<T> collection, Iterable<? extends T> values)
@Nonnull static String checkNotBlank(String value, String name)
@Nonnull static String requireNonBlank(String value, String name)
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected static final Predicate<String> NOT_BLANK

Public Constructors

public BuilderSupport ()

Protected Methods

protected static boolean addIf (Predicate<? super T> predicate, Builder<T> builder, T value)

@SafeVarargs protected static void addIf (Predicate<? super T> predicate, Builder<T> builder, T value, T... values)

protected static boolean addIf (Predicate<? super T> predicate, Collection<T> collection, T value)

protected static void addIf (Predicate<? super T> predicate, Builder<T> builder, Iterable<? extends T> values)

@SafeVarargs protected static void addIf (Predicate<? super T> predicate, Collection<T> collection, T value, T... values)

Parameters
predicate verifies elements prior to adding them to the collection
collection the collection to which elements accepted by the predicate should be added
value the first element to add
values a varargs array containing 0 or more elements to add after the first

protected static void addIf (Predicate<? super T> predicate, Collection<T> collection, Iterable<? extends T> values)

@Nonnull protected static String checkNotBlank (String value, String name)

@Nonnull protected static String requireNonBlank (String value, String name)

Parameters
value the value to ensure is not null or blank.
name a name for the value, used in exception messages
Returns
  • the provided value, if it is not null or blank
Throws
IllegalArgumentException if the provided value is blank
NullPointerException if the provided value is null