Class ThrowingLazy<T,X extends Throwable>

java.lang.Object
io.karma.kommons.lazy.ThrowingLazy<T,X>
All Implemented Interfaces:
Copyable<ThrowingLazy<T,X>>

@API(status=STABLE) public final class ThrowingLazy<T,X extends Throwable> extends Object implements Copyable<ThrowingLazy<T,X>>
Since:
02/02/2022
  • Constructor Details

    • ThrowingLazy

      public ThrowingLazy(XSupplier<T,X> factory)
  • Method Details

    • set

      public void set(@Nullable T value)
    • setIfNotPresent

      public void setIfNotPresent(T value)
    • getOrCreate

      public T getOrCreate() throws X
      Throws:
      X
    • getOptional

      public Optional<T> getOptional()
    • get

      @Nullable public T get()
    • copy

      public ThrowingLazy<T,X> copy()
      Specified by:
      copy in interface Copyable<T>