code: public static <T> Supplier<T> once(final Supplier<T> function) {
          return new Supplier<T>() {
              private volatile boolean executed;
              private T result;
              @Override
              public T get() {
                  if (!executed) {
                      executed = true;
                      result = function.get();
                  }
                  return result;
              }
          };
      }
docs: /*
  Documented, #once