01: /* CVS ID: $Id: Queue.java,v 1.1.1.1 2002/10/02 18:42:49 wastl Exp $ */
02: package net.wastl.webmail.misc;
03:
04: import java.util.*;
05:
06: /**
07: * Queue.java
08: *
09: * Created: Sat Sep 11 16:43:06 1999
10: *
11: * Copyright (C) 2000 Sebastian Schaffert
12: *
13: * This program is free software; you can redistribute it and/or
14: * modify it under the terms of the GNU General Public License
15: * as published by the Free Software Foundation; either version 2
16: * of the License, or (at your option) any later version.
17: *
18: * This program is distributed in the hope that it will be useful,
19: * but WITHOUT ANY WARRANTY; without even the implied warranty of
20: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21: * GNU General Public License for more details.
22: *
23: * You should have received a copy of the GNU General Public License
24: * along with this program; if not, write to the Free Software
25: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26: */
27: /**
28: *
29: * @author Sebastian Schaffert
30: * @version
31: */
32:
33: public class Queue {
34:
35: Vector contents;
36:
37: public Queue() {
38: contents = new Vector();
39: }
40:
41: public void queue(Object o) {
42: contents.addElement(o);
43: }
44:
45: public boolean isEmpty() {
46: return contents.isEmpty();
47: }
48:
49: public Object next() {
50: Object o = contents.firstElement();
51: contents.removeElementAt(0);
52: return o;
53: }
54: } // Queue
|