Interface ChangeListener<T>

Type Parameters:
T - 监听值类型

public interface ChangeListener<T>
值变更监听器
Since:
2024-09-01 15:15
Author:
夜雨
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handler(T from, T to)
    处理值变更事件
    static <T> void
    notifyListener(List<ChangeListener<T>> listenerList, T from, T to)
    通知全部监听器处理本次变更
  • Method Details

    • handler

      void handler(T from, T to)
      处理值变更事件
      Parameters:
      from - 变更前值
      to - 变更后值
    • notifyListener

      static <T> void notifyListener(List<ChangeListener<T>> listenerList, T from, T to)
      通知全部监听器处理本次变更
      Type Parameters:
      T - 监听值类型
      Parameters:
      listenerList - 监听器列表
      from - 变更前值
      to - 变更后值