HashMap extends Iterable with Serializable. I pulled it into HashMap and made the 3 implementations (AppendOnlyMap, PrimitiveKeyOpenHashMap, and OpenHashMap) all extend HashMap so that they shared a common type ancestor. For example, https://github.com/apache/incubator-spark/pull/188/files#diff-d2aa7139229866266272b0263ea5c481R108 shows why this is needed.