From 45e530dceda42282fae56b4c4f5fa7865f57899d Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 4 Jun 2016 16:03:56 +0100 Subject: Remove dotnet (use submodule from dotnet repo instead) --- dotnet/Mammoth/Couscous/java/util/HashMap.cs | 69 ---------------------------- 1 file changed, 69 deletions(-) delete mode 100644 dotnet/Mammoth/Couscous/java/util/HashMap.cs (limited to 'dotnet/Mammoth/Couscous/java/util/HashMap.cs') diff --git a/dotnet/Mammoth/Couscous/java/util/HashMap.cs b/dotnet/Mammoth/Couscous/java/util/HashMap.cs deleted file mode 100644 index 38e516e..0000000 --- a/dotnet/Mammoth/Couscous/java/util/HashMap.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using Mammoth.Couscous.org.zwobble.mammoth.@internal.util; -using Mammoth.Couscous.java.lang; - -namespace Mammoth.Couscous.java.util { - internal class HashMap : Map { - private readonly IDictionary _dictionary; - - internal HashMap() : this(new Dictionary()) { - } - - internal HashMap(IDictionary dictionary) { - _dictionary = dictionary; - } - - public void put(TKey key, TValue value) { - _dictionary[key] = value; - } - - public bool containsKey(TKey key) { - return _dictionary.ContainsKey(key); - } - - public Set> entrySet() { - return new EntrySet(_dictionary); - } - - public Optional _lookup(TKey key) { - if (_dictionary.ContainsKey(key)) { - return new Some(_dictionary[key]); - } else { - return new None(); - } - } - - public IDictionary AsDictionary() { - return _dictionary; - } - - internal class EntrySet : Set> { - private readonly IDictionary _dictionary; - - internal EntrySet(IDictionary dictionary) { - _dictionary = dictionary; - } - - public Iterator> iterator() { - return ToJava.EnumeratorToIterator(_dictionary.Select(entry => Maps.entry(entry.Key, entry.Value)).GetEnumerator()); - } - - public bool isEmpty() { - return _dictionary.Count == 0; - } - - public int size() { - return _dictionary.Count; - } - - public bool contains(object value) { - return value is TKey && _dictionary.ContainsKey((TKey) value); - } - - public void add(Map__Entry value) { - throw new UnsupportedOperationException(); - } - } - } -} -- cgit v1.2.3