func (m *Map) Contains(key interface{}) bool { i := list.NewIterator(m.buckets) for i.First(); !i.IsDone(); i.Next() { c := i.Current().GetValue().(*KeyValue) if c.Equals(key) { return true } } return false }
func (m *Map) Get(key interface{}) interface{} { i := list.NewIterator(m.buckets) for i.First(); !i.IsDone(); i.Next() { c := i.Current().GetValue().(*KeyValue) if c.Equals(key) { return c.Value } } return nil }
func NewMap() *Map { l := list.NewList() i := list.NewIterator(l) return &Map{l, i} }