View Javadoc

1   package com.atlassian.cache;
2   
3   import com.atlassian.annotations.PublicSpi;
4   
5   /**
6    * Supplier for a single object
7    *
8    * @since 2.0
9    */
10  @PublicSpi
11  public interface Supplier<T>
12  {
13      /**
14       * Produce an object. Retrieve an instance of the appropriate type. The
15       * returned object may or may not be a new instance, depending on the
16       * implementation.
17       *
18       * @return the product, may be null if there are no objects available.
19       */
20      T get();
21  
22  }