pascalabcnet/TreeConverter/Collections/associated_collection.cs

33 lines
1,004 B
C#
Raw Permalink Normal View History

2015-06-01 22:15:17 +03:00
// Copyright (c) Ivan Bondarev, Stanislav Mihalkovich (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
2015-05-14 22:35:07 +03:00
using System;
namespace PascalABCCompiler.Collections
{
/*
public class associated_collection<KeyType,ElementType>
{
private System.Collections.Generic.Dictionary<KeyType, ElementType> int_collection =
new System.Collections.Generic.Dictionary<KeyType, ElementType>();
public void AssociateElement(KeyType key, ElementType element)
{
#if DEBUG
if (int_collection[key]!=null)
{
throw new PascalABCCompiler.TreeConverter.CompilerInternalError("Duplicate key in associated collection.");
}
#endif
int_collection[key] = element;
}
public ElementType this[KeyType key]
{
get
{
return int_collection[key];
}
}
}
*/
}