Class RandomSelectBuilder<T>

java.lang.Object
rs.baselib.test.RandomSelectBuilder<T>
All Implemented Interfaces:
Builder<T>

public class RandomSelectBuilder<T> extends Object implements Builder<T>
Provides values randomly from a given list.
Author:
ralph
  • Constructor Details

    • RandomSelectBuilder

      public RandomSelectBuilder()
      Constructor.
  • Method Details

    • withValues

      public RandomSelectBuilder<T> withValues(Collection<T> values)
      Use the given list as values.
      Parameters:
      values - the value list to pick from
      Returns:
      the builder for method chaining
    • withValues

      public RandomSelectBuilder<T> withValues(T[] values)
      Use the given array as values.
      Parameters:
      values - the array list to pick from
      Returns:
      the builder for method chaining
    • build

      public T build()
      Build the previously configured object.
      Specified by:
      build in interface Builder<T>
      Returns:
      the built object