예제 #1
0
        public override Set <TKey> keySet()
        {
            DefaultSet <TKey> setCollection = new DefaultSet <TKey>();

            foreach (TKey key in this.Keys)
            {
                setCollection.add(key);
            }
            return(setCollection);
        }
예제 #2
0
        public virtual Set <K> keySet()
        {
            DefaultSet <K> setCollection = new DefaultSet <K>();

            foreach (K key in this.Keys)
            {
                setCollection.add(key);
            }
            return(setCollection);
        }
예제 #3
0
        public override Set <MapNS.Entry <TKey, TValue> > entrySet()
        {
            DefaultSet <MapNS.DefaultEntry <TKey, TValue> > setCollection = new DefaultSet <MapNS.DefaultEntry <TKey, TValue> >();

            foreach (TKey key in this.Keys)
            {
                TValue v = default(TValue);
                this.TryGetValue(key, out v);
                MapNS.DefaultEntry <TKey, TValue> e = new MapNS.DefaultEntry <TKey, TValue>(key, v);
                setCollection.add(e);
            }
            Set <MapNS.Entry <TKey, TValue> > returnValue = (Set <MapNS.Entry <TKey, TValue> >)setCollection;

            return(returnValue);
        }
예제 #4
0
        public virtual Set <MapNS.Entry <K, V> > entrySet()
        {
            DefaultSet <MapNS.DefaultEntry <K, V> > setCollection = new DefaultSet <MapNS.DefaultEntry <K, V> >();

            foreach (K key in this.Keys)
            {
                V v = default(V);
                this.TryGetValue(key, out v);
                MapNS.DefaultEntry <K, V> e = new MapNS.DefaultEntry <K, V>(key, v);
                setCollection.add(e);
            }
            Set <MapNS.Entry <K, V> > returnValue = (Set <MapNS.Entry <K, V> >)setCollection;

            return(returnValue);
        }