|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- the type of object supplied.public interface Supplier<T>
A Supplier of objects of a single type. Semantically, this could be a
Factory, Generator, Builder, Closure, Producer or something else entirely. No
guarantees are implied by this interface. Implementations may return null if
no objects are available, can optionally block until elements are available
or throw NoSuchElementException
.
Thread safety of a Supplier is not mandated by this interface, although serious care and consideration should be taken with any implementations that are not.
for a similar interface.
Method Summary | |
---|---|
T |
get()
Produce an object. |
Method Detail |
---|
T get()
NoSuchElementException
- if the supply has been exhausted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |