From ec3c8efd317790935c2859300031281e05d41e4a Mon Sep 17 00:00:00 2001 From: Rich Hickey Date: Wed, 7 Jun 2006 18:36:20 +0000 Subject: added IPersistentMap, IMapEntry --- src/cli/runtime/IMapEntry.cs | 23 +++++++++++++++++++++++ src/cli/runtime/IPersistentMap.cs | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 src/cli/runtime/IMapEntry.cs create mode 100644 src/cli/runtime/IPersistentMap.cs (limited to 'src') 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(); +} + +} -- cgit v1.2.3-70-g09d2