package com.light.util; import java.util.*; /** * @绫绘弿杩帮細浜嬩欢瀵硅薄闆嗕腑澶勭悊浠ュ強浜嬩欢鐨勭Щ闄や笌娣诲姞 * @椤圭洰鍚嶇О锛歋canDemo * @鍖呭悕锛� piaost.base * @绫诲悕绉帮細Event * @鍒涘缓浜猴細Administrator * @鍒涘缓鏃堕棿锛�2016-5-25涓嬪崍4:18:02 */ public class Event { private List m_List = new ArrayList(); public void Add(T t) { if (t != null) { m_List.add(t); } } public > void Exeucte(M m) throws Exception { for (T item : m_List) { m.Execute(item); } } public boolean Remove(T t) { if (t != null) { return m_List.remove(t); } return false; } public void Clear() { m_List.clear(); } public boolean Contants(T t) { if (t != null) { return m_List.contains(t); } return false; } public int size() { return m_List.size(); } }