Good way to have a Collection Listener?

前端 未结 5 1111
梦谈多话
梦谈多话 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:17

    You should check out Glazed Lists

    It contains observable List classes, which fire events whenever elements are added, removed, replaced, etc

提交回复
热议问题