@Test(expected = NullPointerException.class) public void shouldThrowNullPointerExceptionIfUnaryFunctionSuppliedToBuildIsNull() throws Exception { SetBuilder<Integer> setBuilder = setBuilderWith(1, 2, 3); UnaryFunction<Iterable<Integer>, Set<Integer>> function = null; setBuilder.build(function); }
@Override public Set<E> build() { return Collections.unmodifiableSet(new HashSet<E>(elements)); }
SetBuilder extends AbstractBuilder<E, SetBuilder<E>, Set<E>> implements AbstractBuilder.WithCustomImplementationSupport<E, Set, Set<E>> { @Override public Set<E> build() { return Collections.unmodifiableSet(new HashSet<E>(elements)); } }
SetBuilder extends AbstractBuilder<E, SetBuilder<E>, Set<E>> implements AbstractBuilder.WithCustomImplementationSupport<E, Set, Set<E>> { @Override public Set<E> build() { return Collections.unmodifiableSet(new HashSet<E>(elements)); }  }
SetBuilder extends AbstractBuilder<E, SetBuilder<E>, Set<E>> implements AbstractBuilder.WithCustomImplementationSupport<E, Set, Set<E>> { @Override public Set<E> build() { return Collections.unmodifiableSet(new HashSet<E>(elements)); }  static SetBuilder<E> setBuilder(); static SetBuilder<E> setBuilder(Class<E> elementClass); @Override Set<E> build(); @Override Set<E> build(Class<? extends Set> implementationClass); @Override T build(UnaryFunction<? super Iterable<E>, ? extends T> builderFunction); }
SetBuilder extends AbstractBuilder<E, SetBuilder<E>, Set<E>> implements AbstractBuilder.WithCustomImplementationSupport<E, Set, Set<E>> { @Override public Set<E> build() { return Collections.unmodifiableSet(new HashSet<E>(elements)); }  static SetBuilder<E> setBuilder(); static SetBuilder<E> setBuilder(Class<E> elementClass); @Override Set<E> build(); @Override Set<E> build(Class<? extends Set> implementationClass); @Override T build(UnaryFunction<? super Iterable<E>, ? extends T> builderFunction);  }