예제 #1
0
            public EntryIterator(CharObjectMap <V> map)
            {
                _index = _tSafeIndex = map.getLastFreeIndex();
                if (map._size == 0)
                {
                    _index = _tSafeIndex + 1;
                }

                _tSet      = map._set;
                _tValues   = map._values;
                _entry     = new Entry <V>();
                _entry.key = _tFv = map._freeValue;
            }
예제 #2
0
            public ForEachIterator(CharObjectMap <V> map)
            {
                _index = _tSafeIndex = map.getLastFreeIndex();
                if (map._size == 0)
                {
                    _index = _tSafeIndex + 1;
                }

                _k       = _tFv = map._freeValue;
                _tSet    = map._set;
                _tValues = map._values;
                _v       = default(V);
            }
예제 #3
0
        public CharObjectMap <V> clone()
        {
            if (_size == 0)
            {
                return(new CharObjectMap <V>());
            }

            CharObjectMap <V> re = new CharObjectMap <V>(capacity());

            //双拷贝
            Array.Copy(_set, 0, re._set, 0, _set.Length);
            Array.Copy(_values, 0, re._values, 0, _values.Length);
            re.copyBase(this);
            re._freeValue = _freeValue;

            return(re);
        }
예제 #4
0
 public EntrySet(CharObjectMap <V> map)
 {
     _map = map;
 }