Fan.Sys.List.trim C# (CSharp) Method

trim() public method

public trim ( ) : List
return List
        public List trim()
        {
            modify();
              if (m_size == 0)
              {
            m_values = m_empty;
              }
              else if (m_size != m_values.Length)
              {
            object[] temp = new object[m_size];
            Array.Copy(m_values, temp, m_size);
            m_values = temp;
              }
              return this;
        }

Usage Example

Example #1
0
        public override List inheritance()
        {
            if (m_inheritance == null)
            {
                Hashtable map = new Hashtable();
                List      acc = new List(Sys.TypeType);

                // handle Void as a special case
                if (this == Sys.VoidType)
                {
                    acc.add(this);
                    return(m_inheritance = acc.trim());
                }

                // add myself
                map[m_qname] = this;
                acc.add(this);

                // add my direct inheritance inheritance
                addInheritance(@base(), acc, map);
                List m = mixins();
                for (int i = 0; i < m.sz(); i++)
                {
                    addInheritance((Type)m.get(i), acc, map);
                }

                m_inheritance = acc.trim().ro();
            }
            return(m_inheritance);
        }
All Usage Examples Of Fan.Sys.List::trim