01: /* Copyright (C) 2003 Internet Archive.
02: *
03: * This file is part of the Heritrix web crawler (crawler.archive.org).
04: *
05: * Heritrix is free software; you can redistribute it and/or modify
06: * it under the terms of the GNU Lesser Public License as published by
07: * the Free Software Foundation; either version 2.1 of the License, or
08: * any later version.
09: *
10: * Heritrix is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13: * GNU Lesser Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser Public License
16: * along with Heritrix; if not, write to the Free Software
17: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18: *
19: * Stack.java
20: * Created on May 21, 2004
21: *
22: * $Header$
23: */
24:
25: package org.archive.queue;
26:
27: /**
28: * Simple Stack: supports add and remove at top.
29: *
30: * @author gojomo
31: * @deprecated As of 1.10.0. Unused.
32: */
33: public interface Stack {
34: /**
35: * Add object to top of Stack
36: *
37: * @param object
38: */
39: public void push(Object object);
40:
41: /**
42: * Remove and return item from top of Stack
43: * @return Item removed from top of Stack
44: */
45: public Object pop();
46:
47: /**
48: * @return Return item from top of Stack without removing it.
49: */
50: public Object peek();
51:
52: /**
53: * Number of items in the Stack.
54: */
55: public long height();
56:
57: /**
58: * Release any OS resources, if necessary.
59: */
60: public void release();
61:
62: /**
63: * @return True if empty.
64: */
65: public boolean isEmpty();
66: }
|