class InjectorFactory {

  static InjectorFunction injectorFunction(InjectorFunction existing, InjectorFunction... update) {
    if (update == null) throw new NullPointerException("injectorFunctions == null");
    LinkedHashSet<InjectorFunction> injectorFunctionSet =
        new LinkedHashSet<>(Arrays.asList(update));
    if (injectorFunctionSet.contains(null)) {
      throw new NullPointerException("injectorFunction == null");
    }
    injectorFunctionSet.remove(InjectorFunction.NOOP);
    if (injectorFunctionSet.isEmpty()) return existing;
    if (injectorFunctionSet.size() == 1) return injectorFunctionSet.iterator().next();
    return new CompositeInjectorFunction(injectorFunctionSet.toArray(new InjectorFunction[0]));
  }

    InjectorFactory(Builder builder);

}