public static @NotNull Runnable once(final @NotNull Runnable delegate) {
    final AtomicBoolean done = new AtomicBoolean(false);
    return () -> {
      if (done.compareAndSet(false, true)) {
        delegate.run();
      }
    };
  }
public static @NotNull Runnable once(final @NotNull Runnable delegate)