code: static <T> Spliterator<T> singletonSpliterator(final T element) {
          return new Spliterator<T>() {
              long est = 1;
  
              @Override
              public Spliterator<T> trySplit() {
                  return null;
              }
  
              @Override
              public boolean tryAdvance(Consumer<? super T> consumer) {
                  Objects.requireNonNull(consumer);
                  if (est > 0) {
                      est--;
                      consumer.accept(element);
                      return true;
                  }
                  return false;
              }
  
              @Override
              public void forEachRemaining(Consumer<? super T> consumer) {
                  tryAdvance(consumer);
              }
  
              @Override
              public long estimateSize() {
                  return est;
              }
  
              @Override
              public int characteristics() {
                  int value = (element != null) ? Spliterator.NONNULL : 0;
  
                  return value | Spliterator.SIZED | Spliterator.SUBSIZED | Spliterator.IMMUTABLE |
                         Spliterator.DISTINCT | Spliterator.ORDERED;
              }
          };
      }
docs: Creates a {@code Spliterator} with only the specified element
  
  @param <T> Type of elements
  @return A singleton {@code Spliterator}