diff options
| author | Rich Hickey <richhickey@gmail.com> | 2006-05-31 17:08:06 +0000 |
|---|---|---|
| committer | Rich Hickey <richhickey@gmail.com> | 2006-05-31 17:08:06 +0000 |
| commit | aaf41d731cc4baa7693cae8d09814a00cd0e6255 (patch) | |
| tree | 421312d2c0bae0e43432535b2d0f1cda2b5b1e39 /src/cli/runtime/Obj.cs | |
| parent | 57162d9fc2d5f78518b20aa49d4843d9de2c1b3e (diff) | |
renamed AMap to Obj
Diffstat (limited to 'src/cli/runtime/Obj.cs')
| -rw-r--r-- | src/cli/runtime/Obj.cs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/cli/runtime/Obj.cs b/src/cli/runtime/Obj.cs new file mode 100644 index 00000000..7058ebe3 --- /dev/null +++ b/src/cli/runtime/Obj.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 Obj
+{ + +HybridDictionary attrs; +public static int INITIAL_SIZE = 7; + +public Object put(Keyword key, Object val) + { + if(attrs == null) + attrs = new HybridDictionary(INITIAL_SIZE); + attrs[key] = val; + return val; + }
+
+public Object get(Keyword key) + { + if(attrs == null) + return null; + return attrs[key]; + } +} +}
\ No newline at end of file |
