// // IMutableLookup.cs // // Author: // Eric Maupin // // Copyright (c) 2011 Eric Maupin (http://www.ermau.com) // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // using System; using System.Collections.Generic; using System.Linq; namespace Cadenza.Collections { internal interface IMutableLookup : ILookup { /// /// Adds under the specified . /// /// The key to add under. /// The element to add. void Add (TKey key, TElement element); /// /// Adds under the specified . /// /// They key to add under. /// The elements to add. /// is null. void Add (TKey key, IEnumerable elements); /// /// Removes from the . /// /// The key that is located under. /// The element to remove from . /// true if and existed, false if not. bool Remove (TKey key, TElement element); /// /// Removes from the lookup. /// /// They to remove. /// true if existed. bool Remove (TKey key); /// /// Clears the lookup. /// void Clear (); } }