~mh-tildemh/jcctray/notifications

« back to all changes in this revision

Viewing changes to src/net/sourceforge/jcctray/model/DashBoardProjects.java

  • Committer: Mark Howard
  • Date: 2008-05-29 17:48:31 UTC
  • Revision ID: markh@wren-20080529174831-vdv2c6ot6chy8lc3
Added balloon notifications of builds

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 * 
25
25
 * @author Ketan Padegaonkar
26
26
 */
27
 
public class DashBoardProjects {
 
27
public class DashBoardProjects implements Iterable {
28
28
 
29
29
        private List    projectList     = new ArrayList();
30
30
 
64
64
                return projectList.iterator();
65
65
        }
66
66
 
 
67
        /**
 
68
         * Returns a project which equals the given project. Note: Equals is defined
 
69
         * as equal name and host, so the project may have a different status.
 
70
         * 
 
71
         * @param newProject
 
72
         *            A project to find
 
73
         * @return A project with the same name and host, or null.
 
74
         */
 
75
        public DashBoardProject get(DashBoardProject newProject) {
 
76
                Iterator it = projectList.iterator();
 
77
                while (it.hasNext())
 
78
                {
 
79
                        Object project = it.next();
 
80
                        if (project.equals(newProject)) {
 
81
                                return (DashBoardProject) project;
 
82
                        }
 
83
                }
 
84
                return null;
 
85
        }
 
86
 
67
87
}