#region CPL License /* Nuclex Framework Copyright (C) 2002-2010 Nuclex Development Labs This library is free software; you can redistribute it and/or modify it under the terms of the IBM Common Public License as published by the IBM Corporation; either version 1.0 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the IBM Common Public License for more details. You should have received a copy of the IBM Common Public License along with this library */ #endregion using System; using System.Collections; using System.Collections.Generic; namespace Nuclex.Support.Collections { /// /// Associative collection that can store several values under one key and vice versa /// /// Type of keys used within the dictionary /// Type of values stored in the dictionary public interface IMultiDictionary : IDictionary>, IDictionary, ICollection>, IEnumerable>, IEnumerable { /// Adds a value into the dictionary under the provided key /// Key the value will be stored under /// Value that will be stored under the specified key void Add(TKey key, TValue value); /// Determines the number of values stored under the specified key /// Key whose values will be counted /// The number of values stored under the specified key int CountValues(TKey key); /// /// Removes the item with the specified key and value from the dictionary /// /// Key of the item that will be removed /// Value of the item that will be removed /// /// True if the specified item was contained in the dictionary and was removed /// /// If the dictionary is read-only bool Remove(TKey key, TValue value); /// Removes all items with the specified key from the dictionary /// Key of the item that will be removed /// The number of items that have been removed from the dictionary /// If the dictionary is read-only int RemoveKey(TKey key); } } // namespace Nuclex.Support.Collections