public virtual ICollection <K3> ThirdKeySet() { ICollection <K3> keys = Generics.NewHashSet(); foreach (K1 k1 in map.Keys) { ThreeDimensionalMap <K2, K3, K4, V> m3 = map[k1]; foreach (K2 k2 in m3.FirstKeySet()) { Sharpen.Collections.AddAll(keys, m3.Get(k2).FirstKeySet()); } } return(keys); }
public virtual ICollection <K4> FourthKeySet() { ICollection <K4> keys = Generics.NewHashSet(); foreach (K1 k1 in map.Keys) { ThreeDimensionalMap <K2, K3, K4, V> m3 = map[k1]; foreach (K2 k2 in m3.FirstKeySet()) { TwoDimensionalMap <K3, K4, V> m2 = m3.Get(k2); foreach (K3 k3 in m2.FirstKeySet()) { Sharpen.Collections.AddAll(keys, m2.Get(k3).Keys); } } } return(keys); }