#region Apache License 2.0
/*
Nuclex .NET Framework
Copyright (C) 2002-2024 Markus Ewald / Nuclex Development Labs
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#endregion // Apache License 2.0
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