using System;
using System.Collections;

namespace digioz
{
    public class Hashtable
    {
        private System.Collections.Hashtable Tablet;

        public Hashtable()
        {
            Tablet = new System.Collections.Hashtable();
        }

        public void AddToTable(object HashKey, object HashValue)
        {
            Tablet.Add(HashKey, HashValue);
        }

        public void RemoveFromTable(object HashKey)
        {
            Tablet.Remove(HashKey);
        }

        public bool ItemExists(object HashValue)
        {
            if (Tablet.ContainsValue(HashValue))
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        public bool KeyExists(object HashKey)
        {
            if (Tablet.ContainsKey(HashKey))
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        public object GetValue(object HashKey)
        {
            object value = Tablet[HashKey];
            return value;
        }

        public int Count()
        {
            return Tablet.Count;
        }

        public void Clear()
        {
            Tablet.Clear();
        }
    }
}
