Google Guava Supplier Example

前端 未结 6 1142
感情败类
感情败类 2021-02-02 07:23

Please explain the use of the interface Supplier(in Guava) with a suitable example .

6条回答
  •  庸人自扰
    2021-02-02 07:56

    Another great use of the class is decoupling - if a component only uses another to obtain a value, do not depend on the concrete implementation, but on this interface.

    Anyway, there is some example code here: http://www.slideshare.net/tfnico/google-guava

提交回复
热议问题