Good way to have a Collection Listener?

前端 未结 5 1193
梦谈多话
梦谈多话 2021-02-07 04:24

Is there a better way to have a listener on a java collection than wrap it in a class implementing the observer pattern ?

5条回答
  •  面向向阳花
    2021-02-07 05:06

    Apache Events.

    "Commons-Events provides additional classes for firing and handling events. It focusses on the Java Collections Framework, providing decorators to other collections that fire events."

提交回复
热议问题