1 17 package org.alfresco.filesys.smb.server.notify; 18 19 import java.util.Vector ; 20 21 24 public class NotifyChangeEventList 25 { 26 27 29 private Vector <NotifyChangeEvent> m_list; 30 31 34 public NotifyChangeEventList() 35 { 36 m_list = new Vector <NotifyChangeEvent>(); 37 } 38 39 44 public final int numberOfEvents() 45 { 46 return m_list.size(); 47 } 48 49 55 public final NotifyChangeEvent getEventAt(int idx) 56 { 57 58 60 if (idx < 0 || idx >= m_list.size()) 61 return null; 62 63 65 return m_list.get(idx); 66 } 67 68 73 public final void addEvent(NotifyChangeEvent evt) 74 { 75 m_list.add(evt); 76 } 77 78 84 public final NotifyChangeEvent removeEventAt(int idx) 85 { 86 87 89 if (idx < 0 || idx >= m_list.size()) 90 return null; 91 92 94 return m_list.remove(idx); 95 } 96 97 100 public final void removeAllEvents() 101 { 102 m_list.removeAllElements(); 103 } 104 } 105 | Popular Tags |