Class Lazy<T>

java.lang.Object
htsjdk.samtools.util.Lazy<T>

public class Lazy<T> extends Object
Simple utility for building an on-demand (lazy) object-initializer. Works by accepting an initializer describing how to build the on-demand object, which is only called once and only after the first invocation of get() (or it may not be called at all).
  • Constructor Details

    • Lazy

      public Lazy(Supplier<T> initializer)
  • Method Details

    • get

      public T get()
      Returns the instance associated with this Lazy, initializing it if necessary.
    • isInitialized

      public boolean isInitialized()