Beispiel #1
0
        /** 获取排序好的List */
        public SList <K> getSortedList()
        {
            SList <K> list = new SList <K>(_size);

            if (_size == 0)
            {
                return(list);
            }

            K[] values = list.getValues();
            int j      = 0;

            K[] keys = _set;
            K   k;

            for (int i = keys.Length - 1; i >= 0; --i)
            {
                if ((k = keys[i]) != null)
                {
                    values[j++] = k;
                }
            }

            list.justSetSize(size());

            list.sort();

            return(list);
        }