Package 

Interface Provider


  • 
    public interface Provider<E extends Object>
    
                        

    A lightweight abstraction similar to Lazy or Future allowing values to be calculated on separate threads, or to be pre-computed.

    • Method Summary

      Modifier and Type Method Description
      abstract E getOrNull() Same as get but will return null instead of throwing an exception if the value could not be computed.
      abstract E get() Return the value sourced from this provider, throwing an exception if the provider failed to calculate a value.
      abstract Boolean getIsComplete()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getOrNull

         abstract E getOrNull()

        Same as get but will return null instead of throwing an exception if the value could not be computed.

      • get

         abstract E get()

        Return the value sourced from this provider, throwing an exception if the provider failed to calculate a value. Anything thrown from here will have been captured when attempting to calculate the value.