code: public static <T> void consumeIfTrue(boolean bool, T target,
              Consumer<T> consumer) {
          if (bool)
              consumer.accept(target);
      }
docs: Consume if true.
  
  @param <T>      the type parameter
  @param bool     the bool
  @param target   the target
  @param consumer the consumer