01: package sisc.modules.hashtable;
02:
03: import java.io.IOException;
04:
05: import sisc.io.ValueWriter;
06: import sisc.ser.Serializer;
07: import sisc.ser.Deserializer;
08: import sisc.util.ExpressionVisitor;
09: import sisc.data.Value;
10: import sisc.data.Pair;
11: import sisc.data.Procedure;
12:
13: public abstract class HashtableBase extends Value {
14:
15: public abstract Procedure getEqualsProc();
16:
17: public abstract Procedure getHashProc();
18:
19: public abstract Value get(Value k);
20:
21: public abstract Value put(Value k, Value v);
22:
23: public abstract Value remove(Value k);
24:
25: public abstract int size();
26:
27: public abstract void clear();
28:
29: public abstract void addAList(Pair p);
30:
31: public abstract Pair toAList();
32:
33: public abstract Pair keys();
34:
35: public abstract boolean valueEqual(Value v);
36:
37: public abstract int valueHashCode();
38:
39: public abstract void serialize(Serializer s) throws IOException;
40:
41: public abstract void deserialize(Deserializer s) throws IOException;
42:
43: public abstract boolean visit(ExpressionVisitor v);
44:
45: public abstract void display(ValueWriter w) throws IOException;
46: }
47:
48: /*
49: * The contents of this file are subject to the Mozilla Public
50: * License Version 1.1 (the "License"); you may not use this file
51: * except in compliance with the License. You may obtain a copy of
52: * the License at http://www.mozilla.org/MPL/
53: *
54: * Software distributed under the License is distributed on an "AS
55: * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
56: * implied. See the License for the specific language governing
57: * rights and limitations under the License.
58: *
59: * The Original Code is the Second Interpreter of Scheme Code (SISC).
60: *
61: * The Initial Developer of the Original Code is Scott G. Miller.
62: * Portions created by Scott G. Miller are Copyright (C) 2000-2007
63: * Scott G. Miller. All Rights Reserved.
64: *
65: * Contributor(s):
66: * Matthias Radestock
67: *
68: * Alternatively, the contents of this file may be used under the
69: * terms of the GNU General Public License Version 2 or later (the
70: * "GPL"), in which case the provisions of the GPL are applicable
71: * instead of those above. If you wish to allow use of your
72: * version of this file only under the terms of the GPL and not to
73: * allow others to use your version of this file under the MPL,
74: * indicate your decision by deleting the provisions above and
75: * replace them with the notice and other provisions required by
76: * the GPL. If you do not delete the provisions above, a recipient
77: * may use your version of this file under either the MPL or the
78: * GPL.
79: */
|