summaryrefslogtreecommitdiff
path: root/src/cli/runtime/AMap.cs
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2006-04-02 16:34:00 +0000
committerRich Hickey <richhickey@gmail.com>2006-04-02 16:34:00 +0000
commitab3658c3f102d470c146260c87d7ea34b365126f (patch)
tree25af35169d4be51c310372e6788ef4e05ea865c7 /src/cli/runtime/AMap.cs
parentad76fd174341a19ec4b311c17d3c760637d81724 (diff)
Initial commit of CLI runtime
Diffstat (limited to 'src/cli/runtime/AMap.cs')
-rw-r--r--src/cli/runtime/AMap.cs40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/cli/runtime/AMap.cs b/src/cli/runtime/AMap.cs
new file mode 100644
index 00000000..76850122
--- /dev/null
+++ b/src/cli/runtime/AMap.cs
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) Rich Hickey. All rights reserved.
+ * The use and distribution terms for this software are covered by the
+ * Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
+ * which can be found in the file CPL.TXT at the root of this distribution.
+ * By using this software in any fashion, you are agreeing to be bound by
+ * the terms of this license.
+ * You must not remove this notice, or any other, from this software.
+ **/
+
+/* rich Mar 25, 2006 3:44:58 PM */
+
+using System;
+using System.Collections.Specialized;
+
+namespace org.clojure.runtime
+{
+
+public class AMap
+{
+
+HybridDictionary attrs;
+public static int INITIAL_SIZE = 7;
+
+public Object put(Symbol key, Object val)
+ {
+ if(attrs == null)
+ attrs = new HybridDictionary(INITIAL_SIZE);
+ attrs[key] = val;
+ return val;
+ }
+
+public Object get(Symbol key)
+ {
+ if(attrs == null)
+ return null;
+ return attrs[key];
+ }
+}
+} \ No newline at end of file