KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jac > samples > photos > Users


1 /*
2   Copyright (C) AOPSYS (http://www.aopsys.com)
3
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU General Public License as published by
6   the Free Software Foundation; either version 2 of the License, or
7   (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   GNU General Public License for more details.
13
14   You should have received a copy of the GNU General Public License
15   along with this program; if not, write to the Free Software
16   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */

17
18 package org.objectweb.jac.samples.photos;
19
20 import java.util.Set JavaDoc;
21 import java.util.HashSet JavaDoc;
22
23 public class Users {
24     Set JavaDoc users = new HashSet JavaDoc();
25
26     /**
27      * Get the value of users.
28      * @return value of users.
29      */

30     public Set JavaDoc getUsers() {
31         return users;
32     }
33
34     /**
35      * Add a user to users.
36      * @param user the user to add.
37      */

38     public void addUser(Person user) {
39         users.add(user);
40     }
41
42     /**
43      * Remove a user from users.
44      * @param user the user to remove.
45      */

46     public void removeUser(Person user) {
47         users.remove(user);
48     }
49 }
50
Popular Tags