-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathTable.cs
More file actions
109 lines (90 loc) · 2.38 KB
/
Copy pathTable.cs
File metadata and controls
109 lines (90 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SharpNTCIP
{
public abstract class Table<K, V> : IDictionary<K, V>
{
protected IDictionary<K, V> _table;
public Table()
{
_table = new Dictionary<K, V>();
}
public Table(IDictionary<K, V> table)
{
_table = new Dictionary<K, V>(table);
}
public virtual void Add(K key, V value)
{
_table.Add(key, value);
}
public virtual bool ContainsKey(K key)
{
return _table.ContainsKey(key);
}
public virtual ICollection<K> Keys
{
get { return _table.Keys; }
}
public virtual bool Remove(K key)
{
return _table.Remove(key);
}
public virtual bool TryGetValue(K key, out V value)
{
return _table.TryGetValue(key, out value);
}
public virtual ICollection<V> Values
{
get { return _table.Values; }
}
public virtual V this[K key]
{
get
{
return _table[key];
}
set
{
_table[key] = value;
}
}
public virtual void Add(KeyValuePair<K, V> item)
{
_table.Add(item.Key, item.Value);
}
public virtual void Clear()
{
_table.Clear();
}
public virtual bool Contains(KeyValuePair<K, V> item)
{
return _table.Contains(item);
}
public virtual void CopyTo(KeyValuePair<K, V>[] array, int arrayIndex)
{
_table.CopyTo(array, arrayIndex);
}
public virtual int Count
{
get { return _table.Count; }
}
public virtual bool IsReadOnly
{
get { return false; }
}
public virtual bool Remove(KeyValuePair<K, V> item)
{
return _table.Remove(item.Key);
}
public virtual IEnumerator<KeyValuePair<K, V>> GetEnumerator()
{
return _table.GetEnumerator();
}
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
return _table.GetEnumerator() as System.Collections.IEnumerator;
}
}
}