main
1using System.Collections;
2
3namespace jive
4{
5 public class SimpleContext : Context
6 {
7 Hashtable items;
8
9 public SimpleContext(Hashtable items)
10 {
11 this.items = items;
12 }
13
14 public bool contains<T>(Key<T> key)
15 {
16 return key.is_found_in(items);
17 }
18
19 public void add<T>(Key<T> key, T value)
20 {
21 key.add_value_to(items, value);
22 }
23
24 public T value_for<T>(Key<T> key)
25 {
26 return key.parse_from(items);
27 }
28
29 public void remove<T>(Key<T> key)
30 {
31 key.remove_from(items);
32 }
33 }
34}