/MartianGuiControls/Utils.cs
https://code.google.com/p/martian-gui-controls/ · C# · 26 lines · 20 code · 5 blank · 1 comment · 0 complexity · b0e72dab875e8eb6cf1b902e7551ce39 MD5 · raw file
- // Published under http://www.opensource.org/licenses/BSD-3-Clause license, see license.txt file for details.
-
- using System.Collections.Generic;
-
- namespace MartianGuiControls
- {
- internal class Set<T>
- {
- private readonly Dictionary<T, object> _d = new Dictionary<T, object>(); // TODO change container
-
- public void Add(T v)
- {
- _d.Add(v, null);
- }
-
- public bool Contains(T v)
- {
- return _d.ContainsKey(v);
- }
-
- public void Remove(T v)
- {
- _d.Remove(v);
- }
- }
- }