diff options
author | Rich Hickey <richhickey@gmail.com> | 2006-06-07 18:36:20 +0000 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2006-06-07 18:36:20 +0000 |
commit | ec3c8efd317790935c2859300031281e05d41e4a (patch) | |
tree | 3f01663928e971ae83a80cb457ce27c15d63760a | |
parent | 9e3009abedb9048ad76eed22408f07e5511f94ce (diff) |
added IPersistentMap, IMapEntry
-rw-r--r-- | src/cli/runtime/IMapEntry.cs | 23 | ||||
-rw-r--r-- | src/cli/runtime/IPersistentMap.cs | 36 |
2 files changed, 59 insertions, 0 deletions
diff --git a/src/cli/runtime/IMapEntry.cs b/src/cli/runtime/IMapEntry.cs new file mode 100644 index 00000000..dd7a4005 --- /dev/null +++ b/src/cli/runtime/IMapEntry.cs @@ -0,0 +1,23 @@ +/**
+ * 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.
+ */
+
+using System;
+
+namespace org.clojure.runtime
+
+{
+
+public interface IMapEntry {
+Object key();
+
+Object val();
+}
+
+}
diff --git a/src/cli/runtime/IPersistentMap.cs b/src/cli/runtime/IPersistentMap.cs new file mode 100644 index 00000000..dc333eeb --- /dev/null +++ b/src/cli/runtime/IPersistentMap.cs @@ -0,0 +1,36 @@ +/**
+ * 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.
+ */
+
+using System;
+using System.Collections;
+
+namespace org.clojure.runtime
+{
+
+public interface IPersistentMap : IEnumerable{
+
+int count();
+
+bool contains(Object key);
+
+IMapEntry find(Object key);
+
+IPersistentMap add(Object key);
+
+IPersistentMap put(Object key, Object val);
+
+IPersistentMap remove(Object key);
+
+Object get(Object key);
+
+int capacity();
+}
+
+}
|